RedM Natives

_GET_CAN_SWITCH_WEAPON

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

Hash0xBC9444F2FF94A9C0
Runtime nameGetCanSwitchWeapon
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1355
Also known as_GET_PED_CAN_SWITCH_WEAPON

Signature

BOOL _GET_CAN_SWITCH_WEAPON(Ped ped);

Parameters

NameTypeDescription
pedPed—

Returns BOOL

Description

alloc8or RDR3 NativeDB

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

VORPCORE RDR3natives

Returns true if the ped can switch of weapon.

Usage

Lua
local retval = GetCanSwitchWeapon(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0xBC9444F2FF94A9C0, ped, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = GetCanSwitchWeapon(ped);

// by hash
const retval = Citizen.invokeNative('0xBC9444F2FF94A9C0', ped, Citizen.returnResultAnyway());
C#
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 InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.