How to detect if player has any weapons ?
#1

Hello !

Can anyone tell me, How can I detect if a player has any weapons ? (Not Melee weapons)

Thanks in advance
Reply
#2

This? GetPlayerWeapon
Reply
#3

No :/

I want to Detect if a Player has Even a Single GUN. and
GetPlayerWeapon is used for Detecting a Single Weapon ID. or More But "ID" and I want "any" weapon.
Reply
#4

PHP Code:
if(GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon == 26)/*Random ids*/ 
You can add what ids you want to detect.
Reply
#5

I tried it but not worked :/
Reply
#6

Alright, then explain more. What weapons do you want to detect and why. And show us the part of the code you want it implemented in.
Reply
#7

player can carry only 1 weapon in every slot
there are 13 slots !
so Get Player Weapon Data For Every slot and check weapon ID.
you can ignore melee weapons slot !

https://sampwiki.blast.hk/wiki/GetPlayerWeaponData

explain more about what exactly want
Reply
#8

Fixed it my self....Just Defined the ID(s) and done the job
Thanks Everyone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)