controlMountedWeapon
CONTROL_MOUNTED_WEAPON0xDCFE42068FE0135AThe GTA V native CONTROL_MOUNTED_WEAPON of the TASK namespace, as LS:MP client scripts call it: the global function controlMountedWeapon, in JavaScript and in Lua.
controlMountedWeapon(ped: Ped): booleancontrolMountedWeapon(ped: Ped): booleanUsage
JavaScript
const result = controlMountedWeapon(ped);Lua
local result = controlMountedWeapon(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Forces the ped to use the mounted weapon.
Returns false if task is not possible.
Reference
- Namespace
- Tasks TASK
- In the game
BOOL CONTROL_MOUNTED_WEAPON(Ped ped)- Hash
0xDCFE42068FE0135A