The Lab
WEAPON native

_GET_PED_WEAPON_OBJECT

returns Object2 paramsbuild 1207

Returns the object of the weapon the ped is currently holding.

Signature

C
Object _GET_PED_WEAPON_OBJECT(Ped ped, BOOL p1); // 0x6CA484C9A7377E4F b1207

Parameters

#NameType
1pedPed
2p1BOOL

Facts

Facts about _GET_PED_WEAPON_OBJECT
Name
_GET_PED_WEAPON_OBJECT
Hash
0x6CA484C9A7377E4F
Namespace
Returns
Object
Game build
1207

Examples

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

Lua
local objectOut = Citizen.InvokeNative(0x6CA484C9A7377E4F, -- _GET_PED_WEAPON_OBJECT
  PlayerPedId(), -- Ped ped
  false, -- BOOL p1
  Citizen.ResultAsInteger()
)
print(objectOut)
JavaScript
const objectOut = Citizen.invokeNative("0x6CA484C9A7377E4F", // _GET_PED_WEAPON_OBJECT
  PlayerPedId(), // Ped ped
  false, // BOOL p1
  Citizen.resultAsInteger()
);
console.log(objectOut)
C#
int objectOut = Function.Call<int>((Hash)0x6CA484C9A7377E4F, // _GET_PED_WEAPON_OBJECT
  API.PlayerPedId(), // Ped ped
  false // BOOL p1
);
All WEAPON natives

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