WeaponClient

setPedShootOrdnanceWeapon

SET_PED_SHOOT_ORDNANCE_WEAPON0xB4C8D77C80C0421E

The GTA V native SET_PED_SHOOT_ORDNANCE_WEAPON of the WEAPON namespace, as LS:MP client scripts call it: the global function setPedShootOrdnanceWeapon, in JavaScript and in Lua.

SignatureJavaScript
setPedShootOrdnanceWeapon(ped: Ped, p1: number): Object
SignatureLua
setPedShootOrdnanceWeapon(ped: Ped, p1: number): Object

Usage

JavaScript
const object = setPedShootOrdnanceWeapon(ped, p1);
Lua
local object = setPedShootOrdnanceWeapon(ped, p1)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
p1floatnumbernumber

Returns

Object JavaScript number, Lua integer

Game handle of an object (prop). Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns handle of the projectile.

Reference

Namespace
Weapon WEAPON
In the game
Object SET_PED_SHOOT_ORDNANCE_WEAPON(Ped ped, float p1)
Hash
0xB4C8D77C80C0421E

Open in the interactive natives reference