06.08.2010, 23:03
Original Sa:Mp:
Use: RemoveplayerWeaponn(playerid, weaponid)
pawn Код:
RemovePlayerWeapon(playerid);
Use: RemoveplayerWeaponn(playerid, weaponid)
pawn Код:
RemovePlayerWeaponn(playerid, weaponid)
{
if(!IsPlayerConnected(playerid) || weaponid < 0 || weaponid > 50)
return;
new
saveweapon[13],
saveammo[13];
for(new slot = 0; slot < 13; slot++)
GetPlayerWeaponData(playerid, slot, saveweapon[slot], saveammo[slot]);
ResetPlayerWeapons(playerid);
for(new slot; slot < 13; slot++)
{
if(saveweapon[slot] == weaponid || saveammo[slot] == 0)
continue;
GivePlayerWeapon(playerid, saveweapon[slot], saveammo[slot]);
}
GivePlayerWeapon(playerid, 0, 1);
}