_GET_PED_WEAPON_IN_SLOT
Returns the weapon hash the ped has in the inventory slot slotHash.
Signature
Hash _GET_PED_WEAPON_IN_SLOT(Ped ped, Hash slotHash); // 0xDBC4B552B2AE9A83 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | slotHash | Hash |
Facts
| 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.
local hash = Citizen.InvokeNative(0xDBC4B552B2AE9A83, -- _GET_PED_WEAPON_IN_SLOT
PlayerPedId(), -- Ped ped
GetHashKey("name"), -- Hash slotHash
Citizen.ResultAsInteger()
)
print(hash)const hash = Citizen.invokeNative("0xDBC4B552B2AE9A83", // _GET_PED_WEAPON_IN_SLOT
PlayerPedId(), // Ped ped
GetHashKey("name"), // Hash slotHash
Citizen.resultAsInteger()
);
console.log(hash)int hash = Function.Call<int>((Hash)0xDBC4B552B2AE9A83, // _GET_PED_WEAPON_IN_SLOT
API.PlayerPedId(), // Ped ped
(uint)API.GetHashKey("name") // Hash slotHash
);Related WEAPON natives
- _GET_PED_WEAPON_OBJECT
- _GET_AMMO_IN_PED_WEAPON_FROM_GUID
- _GET_BEST_PED_WEAPON_IN_GROUP
- _GET_BEST_PED_WEAPON_IN_INVENTORY
- _GET_WEAPON_FROM_DEFAULT_PED_WEAPON_COLLECTION
- _GET_PED_WORST_WEAPON
- _GET_PED_CURRENT_HELD_WEAPON
- _GET_PED_GUN_SPINNING_HASH_FROM_WEAPON_EMOTE_VARIATION
- _GET_PED_HOGTIE_WEAPON
- GET_AMMO_IN_PED_WEAPON
- _GET_PLAYER_PED_QUICK_SWAP_WEAPON_BY_GUID
- _GET_CURRENT_PED_WEAPON_AMMO_TYPE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.