If 10,000 ammo -> gun disables - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: If 10,000 ammo -> gun disables (
/showthread.php?tid=410341)
If 10,000 ammo -> gun disables -
davelord - 25.01.2013
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)
Re: If 10,000 ammo -> gun disables -
RajatPawar - 25.01.2013
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerAmmo(playerid)>10000) SetPlayerAmmo(playerid, GetPlayerWeapon(playerid),0);
return 1;
}
Put it under whatever callback you need to.