12.04.2015, 08:57
Here is what you can use:
and:
pawn Код:
new currentammo[MAX_PLAYERS];
new gunammo[MAX_PLAYERS];
public OnPlayerChangeWeapon(playerid, oldweapon, newweapon)
{
if(newweapon == 27) // taking spas for example
{
currentammo[playerid] = 7;
gunammo[playerid] = GetPlayerAmmo(playerid)-currentammo[playerid];
}
return 1;
}
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid == 27)
{
currentammo[playerid] -= 1;
}
return 1;
}