_GET_PED_WEAPON_IN_SLOT
slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
Hash
0xDBC4B552B2AE9A83Runtime name
GetPedWeaponInSlotNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Hash _GET_PED_WEAPON_IN_SLOT(Ped ped, Hash slotHash);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
slotHash | Hash | — |
Returns Hash
Description
slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
Usage
local retval = GetPedWeaponInSlot(ped, slotHash)
-- always works, by hash
local retval = Citizen.InvokeNative(0xDBC4B552B2AE9A83, ped, slotHash, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPedWeaponInSlot(ped, slotHash);
// by hash
const retval = Citizen.invokeNative('0xDBC4B552B2AE9A83', ped, slotHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xDBC4B552B2AE9A83, ped, slotHash);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.