Get Player Current Weapon



I am trying to find a way to check what weapon the player is currently holding and if they are holding a certain weapon it returns a true value for an if statement.

I have tried to use
if GetCurrentPedWeapon(ped, weapon) == 1 then
but no matter what weapon you are holding it returns 1.

Any help would be appreciated :smiley:



maybe you could use this native : GET_SELECTED_PED_WEAPON(Ped ped)

it return you the hash of the weapon.


Yep that worked perfectly - did

if GetSelectedPedWeapon(ped) == GetHashKey("weapon_specialcarbine") then

This returns true if the selected weapon is the Special Carbine Rifle

Thanks for your help!


glad to help :+1:

(donโ€™t forget to click on solve if itโ€™s solve ^^)