If 10,000 ammo -> gun disables
#1

Hi there. I was just wondering how I could make a firearm disable itself immediately after it reaches 10,000 ammo.

(Disabling as in, unable to shoot it)
Reply
#2

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAmmo(playerid)>10000) SetPlayerAmmo(playerid, GetPlayerWeapon(playerid),0);
    return 1;
}
Put it under whatever callback you need to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)