27.03.2010, 08:42
How to set weapon ammo to 0?
SetPlayerAmmo(0)
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, weaponid, ammo);
Originally Posted by DarkPhoenix
pawn Код:
pawn Код:
|
stock RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
if(plyAmmo[slot] != 0 && plyWeapons[slot] != weaponid)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
return 1;
}
Originally Posted by MadeMan
You can use this function
pawn Код:
|
Originally Posted by whitedragon
Quote:
|