GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo); static stock iPlayerSpawnWeapon[MAX_PLAYERS][50];
stock GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo)
{
// Is the player connected?
if(!IsPlayerConnected(iPlayerID))
return false;
// Is the weapon ID valid?
if(iWeaponID 50)
return false;
// If a player already has this spawn weapon, just add the ammo.
if(iPlayerSpawnWeapon[iPlayerID][iWeaponID] > 0)
{
iPlayerSpawnWeapon[iPlayerID][iWeaponID] += iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return 1;
}
iPlayerSpawnWeapon[iPlayerID][iWeaponID] = iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return true;
}
И в спавн пихнуть
for(new iWeaponID; iWeaponID < 50; iWeaponID++)
{
if(iPlayerSpawnWeapon[playerid][iWeaponID] > 0)
GivePlayerWeapon(playerid,iWeaponID,iPlayerSpawnWeapon[playerid][iWeaponID]);
}