Give ammunition?
#1

Hi. I want to Design a command to design a command to give ammunition (Not give gun).

Any suggest?
Reply
#2

You mean to give ammo for weapons ?

pawn Код:
SetPlayerAmmo(playerid, weaponslot, GetPlayerAmmo(playerid));
Reply
#3

Use GetPlayerWeaponData to get the weapon ID the player has in the specific slot, then use GivePlayerWeapon to give ammo .
Reply
#4

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.
Reply
#5

wait. i think i can use GetPlayerWeapon

Quote:

new gunid;
gunid = GetPlayerWeapon(Playerid)
GivePlayerWeapon(playerid, gunid, 500)

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)