_GET_CAN_SWITCH_WEAPON
Returns whether the ped is currently allowed to switch weapons (weapon switching not locked by internal code/state).
Hash
0xBC9444F2FF94A9C0Runtime name
GetCanSwitchWeaponNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1355
Also known as
_GET_PED_CAN_SWITCH_WEAPONSignature
BOOL _GET_CAN_SWITCH_WEAPON(Ped ped);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
Returns BOOL
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
Returns true if the ped can switch of weapon.
Usage
local retval = GetCanSwitchWeapon(ped)
-- always works, by hash
local retval = Citizen.InvokeNative(0xBC9444F2FF94A9C0, ped, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = GetCanSwitchWeapon(ped);
// by hash
const retval = Citizen.invokeNative('0xBC9444F2FF94A9C0', ped, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xBC9444F2FF94A9C0, ped);- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.