setCurrentPedVehicleWeapon
SET_CURRENT_PED_VEHICLE_WEAPON0x75C55983C2C39DAAThe GTA V native SET_CURRENT_PED_VEHICLE_WEAPON of the WEAPON namespace, as LS:MP client scripts call it: the global function setCurrentPedVehicleWeapon, in JavaScript and in Lua.
setCurrentPedVehicleWeapon(ped: Ped, weaponHash: Hash): booleansetCurrentPedVehicleWeapon(ped: Ped, weaponHash: Hash): booleanUsage
JavaScript
const result = setCurrentPedVehicleWeapon(ped, weaponHash);Lua
local result = setCurrentPedVehicleWeapon(ped, weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | 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.
Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
BOOL SET_CURRENT_PED_VEHICLE_WEAPON(Ped ped, Hash weaponHash)- Hash
0x75C55983C2C39DAA