Player Weapons
#1

How would I go about checking if a player has a specific weapon, and if they have that weapon, check how much ammo it has?
Reply
#2

This will answer to whole the question.
Reply
#3

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
This will answer to whole the question.
Alright, so I've managed to get the players weapon (thanks to you), but the function GetPlayerAmmo and SetPlayerAmmo only works for the players active weapon slot, how could I get/set the ammo of a specific weapon slot without making it active?

Edit: I know how to retrieve ammo from inactive weapon slots, but how do I set them?

Second Edit: I'm an idiot, thanks.
Reply
#4

Here you go

pawn Код:
new ammo = GetPlayerAmmo(playerid);
SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), ammo);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)