The Lab
WEAPON native

_GET_PED_WEAPON_IN_SLOT

returns Hash2 paramsbuild 1207

Returns the weapon hash the ped has in the inventory slot slotHash.

Signature

C
Hash _GET_PED_WEAPON_IN_SLOT(Ped ped, Hash slotHash); // 0xDBC4B552B2AE9A83 b1207

Parameters

#NameType
1pedPed
2slotHashHash

Facts

Facts about _GET_PED_WEAPON_IN_SLOT
Name
_GET_PED_WEAPON_IN_SLOT
Hash
0xDBC4B552B2AE9A83
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(0xDBC4B552B2AE9A83, -- _GET_PED_WEAPON_IN_SLOT
  PlayerPedId(), -- Ped ped
  GetHashKey("name"), -- Hash slotHash
  Citizen.ResultAsInteger()
)
print(hash)
JavaScript
const hash = Citizen.invokeNative("0xDBC4B552B2AE9A83", // _GET_PED_WEAPON_IN_SLOT
  PlayerPedId(), // Ped ped
  GetHashKey("name"), // Hash slotHash
  Citizen.resultAsInteger()
);
console.log(hash)
C#
int hash = Function.Call<int>((Hash)0xDBC4B552B2AE9A83, // _GET_PED_WEAPON_IN_SLOT
  API.PlayerPedId(), // Ped ped
  (uint)API.GetHashKey("name") // Hash slotHash
);
All WEAPON natives

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