SA-MP Forums Archive
Getting ammo, could anyone explain why this won't work? - 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: Getting ammo, could anyone explain why this won't work? (/showthread.php?tid=573850)



Getting ammo, could anyone explain why this won't work? - Dokins - 11.05.2015

pawn Код:
new ammo = GetPlayerAmmo(playerid);
    if(ammo == 0)
    {
            ProxDetector(30.0, playerid, "* CLINK *", COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
            SendClientMessage(playerid, COLOUR_GREY, "You are out of ammo for this weapon. You need to load more into it, before you can use it again.");
    }
Under OnPlayerWeaponShot


Re: Getting ammo, could anyone explain why this won't work? - [KHK]Khalid - 11.05.2015

I don't get it, how would a player fire a shot while they're out of ammo?


Re: Getting ammo, could anyone explain why this won't work? - Dokins - 11.05.2015

Good point!

That makes sense...