The Lab
WEAPON native

GET_CURRENT_PED_WEAPON

returns BOOL5 paramsbuild 1207

Writes the hash of the ped's current weapon at the given attach point to weaponHash. Returns true if the ped has one.

Signature

C
BOOL GET_CURRENT_PED_WEAPON(Ped ped, Hash* weaponHash, BOOL p2, int attachPoint, BOOL p4); // 0x3A87E44BB9A01D54 b1207

Parameters

#NameType
1pedPed
2weaponHashHash* (out pointer)
3p2BOOL
4attachPointint
5p4BOOL

Facts

Facts about GET_CURRENT_PED_WEAPON
Name
GET_CURRENT_PED_WEAPON
Hash
0x3A87E44BB9A01D54
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, weaponHash = Citizen.InvokeNative(0x3A87E44BB9A01D54, -- GET_CURRENT_PED_WEAPON
  PlayerPedId(), -- Ped ped
  Citizen.PointerValueInt(), -- Hash* weaponHash
  false, -- BOOL p2
  0, -- int attachPoint
  false, -- BOOL p4
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, weaponHash] = Citizen.invokeNative("0x3A87E44BB9A01D54", // GET_CURRENT_PED_WEAPON
  PlayerPedId(), // Ped ped
  Citizen.pointerValueInt(), // Hash* weaponHash
  false, // BOOL p2
  0, // int attachPoint
  false, // BOOL p4
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var weaponHashArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x3A87E44BB9A01D54, // GET_CURRENT_PED_WEAPON
  API.PlayerPedId(), // Ped ped
  weaponHashArg, // Hash* weaponHash
  false, // BOOL p2
  0, // int attachPoint
  false // BOOL p4
);
int weaponHash = weaponHashArg.GetResult<int>();
All WEAPON natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.