29.04.2013, 07:48
pawn Код:
public RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);
if(wep != weaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
}
SafeResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
SafeGivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
if (weaponid == 23) PlayerInfo[playerid][pSDPistol] = 0;
if (weaponid == 24) PlayerInfo[playerid][pDeagle] = 0;
if (weaponid == 25) PlayerInfo[playerid][pShotgun] = 0;
if (weaponid == 29) PlayerInfo[playerid][pMP5] = 0;
if (weaponid == 30) PlayerInfo[playerid][pAK47] = 0;
if (weaponid == 31) PlayerInfo[playerid][pM4] = 0;
if (weaponid == 33) PlayerInfo[playerid][pRifle] = 0;
return 1;
}