PedClient

setPedCanSwitchWeapon

SET_PED_CAN_SWITCH_WEAPON0xED7F7EFE9FABF340

The GTA V native SET_PED_CAN_SWITCH_WEAPON of the PED namespace, as LS:MP client scripts call it: the global function setPedCanSwitchWeapon, in JavaScript and in Lua.

SignatureJavaScript
setPedCanSwitchWeapon(ped: Ped, toggle: boolean): void
SignatureLua
setPedCanSwitchWeapon(ped: Ped, toggle: boolean)

Usage

JavaScript
setPedCanSwitchWeapon(ped, toggle);
Lua
setPedCanSwitchWeapon(ped, toggle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Ped PED
In the game
void SET_PED_CAN_SWITCH_WEAPON(Ped ped, BOOL toggle)
Hash
0xED7F7EFE9FABF340

Open in the interactive natives reference