RedM Natives

_GET_PED_WEAPON_IN_SLOT

slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*

Hash0xDBC4B552B2AE9A83
Runtime nameGetPedWeaponInSlot
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207

Signature

Hash _GET_PED_WEAPON_IN_SLOT(Ped ped, Hash slotHash);

Parameters

NameTypeDescription
pedPed—
slotHashHash—

Returns Hash

Description

slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*

Usage

Lua
local retval = GetPedWeaponInSlot(ped, slotHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0xDBC4B552B2AE9A83, ped, slotHash, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPedWeaponInSlot(ped, slotHash);

// by hash
const retval = Citizen.invokeNative('0xDBC4B552B2AE9A83', ped, slotHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xDBC4B552B2AE9A83, ped, slotHash);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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