Weapon Check Help!
#1

Okay so I was wondering how do I check if a player has a certain gun in his inventory For example If he tries to use /rob, but you need a shotgun to do it? How do I check to see if he has a shotgun or any other weapon for that matter?
Reply
#2

Use the function GetPlayerWeapon Link: https://sampwiki.blast.hk/wiki/GetPlayerWeapon

for example
pawn Код:
if(GetPlayerWeapon(playerid) != 25) return SendClientMessage(playerid, -1, "You must be holding a shot gun to rob this store!"); //if player is not holding that weapon, it will show the error.
Reply
#3

Thanks !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)