WeaponClient

getPedWeapontypeInSlot

GET_PED_WEAPONTYPE_IN_SLOT0xEFFED78E9011134D

The GTA V native GET_PED_WEAPONTYPE_IN_SLOT of the WEAPON namespace, as LS:MP client scripts call it: the global function getPedWeapontypeInSlot, in JavaScript and in Lua.

SignatureJavaScript
getPedWeapontypeInSlot(ped: Ped, weaponSlot: Hash): Hash
SignatureLua
getPedWeapontypeInSlot(ped: Ped, weaponSlot: Hash): Hash

Usage

JavaScript
const hash = getPedWeapontypeInSlot(ped, weaponSlot);
Lua
local hash = getPedWeapontypeInSlot(ped, weaponSlot)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponSlotHashnumberinteger

Returns

Hash JavaScript number, Lua integer

A game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.

Reference

Namespace
Weapon WEAPON
In the game
Hash GET_PED_WEAPONTYPE_IN_SLOT(Ped ped, Hash weaponSlot)
Hash
0xEFFED78E9011134D

Open in the interactive natives reference