07.08.2012, 20:04
if(GetPlayerWeapon(playerid) == 1) "remove the current weapon here if that is possible"
if(GetPlayerWeapon(playerid) == 1) "remove the current weapon here if that is possible"
|
stock SetPlayerAmmo(playerid, weaponid, ammo)
{
new weapon[13][2];
for(new i=0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapon[i][0], weapon[i][1]);
if(weapon[i][0] == weaponid)
{
GivePlayerWeapon(playerid, weaponid, -(weapon[i][1]*2));
break;
}
}
GivePlayerWeapon(playerid, weaponid, ammo);
return 1;
}
pawn Код:
http://forum.sa-mp.com/showpost.php?...31&postcount=6 |