Add ammo?
#1

Hey guys, I am wondering, is there such thing that adds ammo to certain weapons? Like once the dialog pops up and someone can choose ammo for lets say mp5 only how can I add ammo to that certain weapon?
Reply
#2

Use the Function SetPlayerAmmo

Ex.
pawn Код:
SetPlayerAmmo(playerid, WEAPON_SHOTGUN, 100);
this will put 100 ammo in the shotgun.
Reply
#3

Ah, I wasn't aware of that function, do I need to define the weapons?
Reply
#4

You can use something like this:
pawn Код:
new Ammo = GetPlayerAmmo(playerid);
SetPlayerAmmo(playerid, YOURWEAPONIDHERE, Ammo+ 100);
Hope this helps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)