Give ammunition? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Give ammunition? (
/showthread.php?tid=177629)
Give ammunition? -
billy4601 - 18.09.2010
Hi. I want to Design a command to design a command to give ammunition (Not give gun).
Any suggest?
Re: Give ammunition? -
Matej_ - 18.09.2010
You mean to give ammo for weapons ?
pawn Код:
SetPlayerAmmo(playerid, weaponslot, GetPlayerAmmo(playerid));
Re: Give ammunition? -
Hiddos - 18.09.2010
Use GetPlayerWeaponData to get the weapon ID the player has in the specific slot, then use GivePlayerWeapon to give ammo .
Re: Give ammunition? -
billy4601 - 18.09.2010
Quote:
Originally Posted by Matej_
You mean to give ammo for weapons ?
pawn Код:
SetPlayerAmmo(playerid, weaponslot, GetPlayerAmmo(playerid));
|
WoW! I don't this Functions. may be i can use that.
But, can only give the Ammo that player is useing?
If player useing a M4. When player use this command. only give M4 ammo.
Re: Give ammunition? -
billy4601 - 18.09.2010
wait. i think i can use GetPlayerWeapon
Quote:
new gunid;
gunid = GetPlayerWeapon(Playerid)
GivePlayerWeapon(playerid, gunid, 500)
|