The Lab
WEAPON native

GET_BEST_PED_WEAPON

returns Hash3 paramsbuild 1207

Returns the hash of the best weapon the ped has.

Signature

C
Hash GET_BEST_PED_WEAPON(Ped ped, BOOL p1, BOOL p2); // 0x8483E98E8B888AE2 b1207

Parameters

#NameType
1pedPed
2p1BOOL
3p2BOOL

Facts

Facts about GET_BEST_PED_WEAPON
Name
GET_BEST_PED_WEAPON
Hash
0x8483E98E8B888AE2
Namespace
Returns
Hash
Game build
1207

Examples

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

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

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