GET_CURRENT_PED_WEAPON
Hash
0x3A87E44BB9A01D54Runtime name
GetCurrentPedWeaponNamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x3A87E44BB9A01D54Signature
BOOL GET_CURRENT_PED_WEAPON(Ped ped, Hash* weaponHash, BOOL p2, int attachPoint, BOOL p4);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash* | — |
p2 | BOOL | — |
attachPoint | int | — |
p4 | BOOL | — |
Returns BOOL
Description
attachPoint: see SET_CURRENT_PED_WEAPON
Usage
local retval, weaponHash = GetCurrentPedWeapon(ped, p2, attachPoint, p4)
-- always works, by hash
local retval, weaponHash = Citizen.InvokeNative(0x3A87E44BB9A01D54, ped, Citizen.PointerValueInt(), p2, attachPoint, p4, Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, weaponHash] = GetCurrentPedWeapon(ped, p2, attachPoint, p4);
// by hash
const [retval, weaponHash] = Citizen.invokeNative('0x3A87E44BB9A01D54', ped, Citizen.pointerValueInt(), p2, attachPoint, p4, Citizen.returnResultAnyway());var weaponHash = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x3A87E44BB9A01D54, ped, weaponHash, p2, attachPoint, p4);
// weaponHash.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Enums and flags
- eWeaponAttachPoint 33 values
See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.