{"hash":"0xBC9444F2FF94A9C0","ns":"WEAPON","name":"_GET_CAN_SWITCH_WEAPON","slug":"_GET_CAN_SWITCH_WEAPON","official":false,"named":true,"luaName":"GetCanSwitchWeapon","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"ped","type":"Ped"}],"summary":"Returns whether the ped is currently allowed to switch weapons (weapon switching not locked by internal code/state).","descriptions":[{"source":"alloc8or","format":"text","body":"Returns whether the ped is currently allowed to switch weapons (weapon switching not locked by internal code/state).\n\nScript 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.\n\nExample video: https://imgur.com/a/hawFMhN"},{"source":"vorp","format":"text","body":"Returns true if the ped can switch of weapon."}],"examples":[],"aliases":["_GET_PED_CAN_SWITCH_WEAPON"],"enums":[],"related":[],"build":"1355","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/WEAPON/_GET_CAN_SWITCH_WEAPON","markdownUrl":"https://natives.borderlinerp.com/natives/WEAPON/_GET_CAN_SWITCH_WEAPON.md","snippets":{"lua":"local retval = GetCanSwitchWeapon(ped)","luaInvoke":"local retval = Citizen.InvokeNative(0xBC9444F2FF94A9C0, ped, Citizen.ReturnResultAnyway())","js":"const retval = GetCanSwitchWeapon(ped);","jsInvoke":"const retval = Citizen.invokeNative('0xBC9444F2FF94A9C0', ped, Citizen.returnResultAnyway());","csharp":"bool retval = Function.Call<bool>((Hash)0xBC9444F2FF94A9C0, ped);","notes":["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."]}}