23.05.2014, 16:32
PHP код:
new weaponsDuty[MAX_PLAYERS][12] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
// When the player duties
GivePlayerWeapon(playerid, weaponid);
for(new i = 0; i < 12; i++)
{
if(weaponsDuty[playerid][i] == -1 && i != weaponid) weaponsDuty[playerid][i] = weaponid; break;
}
// When the player unduties
for(new i = 0; i < MAX_PLAYERS; i++)
{
RemovePlayerWeapon(playerid, weaponsDuty[playerid][i]);
}