Native referenceRedMclient

_GET_PED_CAN_SWITCH_WEAPON

0xBC9444F2FF94A9C0 WEAPON
FUNCTION SIGNATURE
BOOL _GET_PED_CAN_SWITCH_WEAPON(Ped ped);
Property Value
Native Name _GET_PED_CAN_SWITCH_WEAPON
Hash 0xBC9444F2FF94A9C0
Return Type BOOL
Build 1355
API Set client
Parameters ped (Ped)

Description: Returns whether the ped is currently allowed to switch weapons (weapon switching not locked by internal code/state).

Script evidence: used as an additional gate in NPLOI__CAN_GUN_SPIN_PREVIEW; when it returns false scripts log "Prevented by Code" even if twirl-capable weapons exist in hand/holsters.

Example video: https://imgur.com/a/hawFMhN

Usage

Lua (Direct):

local result = GetPedCanSwitchWeapon(ped)

Lua (Hash):

local result = Citizen.InvokeNative(0xBC9444F2FF94A9C0, ped)
Back to WEAPON