18.04.2015, 05:49
PHP код:
stock RemovePlayerWeapon(playerid, pweaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot < 12; slot++)
{
new pwep, pammo;
GetPlayerWeaponData(playerid, slot, pwep, pammo);
if(pwep != pweaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot < 12; slot++)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
stock ResetPlayerWeaponsEx(playerid)
{
new weapon, ammo;
for(new i=0;i<12; i++)
{
GetPlayerWeaponData(playerid, i, weapon, ammo);
if(weapon<16) RemovePlayerWeapon(playerid, weapon);
}
}