RedM Natives

GET_CURRENT_PED_WEAPON

Hash0x3A87E44BB9A01D54
Runtime nameGetCurrentPedWeapon
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x3A87E44BB9A01D54

Signature

BOOL GET_CURRENT_PED_WEAPON(Ped ped, Hash* weaponHash, BOOL p2, int attachPoint, BOOL p4);

Parameters

NameTypeDescription
pedPed—
weaponHashHash*—
p2BOOL—
attachPointint—
p4BOOL—

Returns BOOL

Description

attachPoint: see SET_CURRENT_PED_WEAPON

Usage

Lua
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#
JavaScript
const [retval, weaponHash] = GetCurrentPedWeapon(ped, p2, attachPoint, p4);

// by hash
const [retval, weaponHash] = Citizen.invokeNative('0x3A87E44BB9A01D54', ped, Citizen.pointerValueInt(), p2, attachPoint, p4, Citizen.returnResultAnyway());
C#
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

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.