WeaponClient

getWeapontypeSlot

GET_WEAPONTYPE_SLOT0x4215460B9B8B7FA0

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

SignatureJavaScript
getWeapontypeSlot(weaponHash: Hash): Hash
SignatureLua
getWeapontypeSlot(weaponHash: Hash): Hash

Usage

JavaScript
const hash = getWeapontypeSlot(weaponHash);
Lua
local hash = getWeapontypeSlot(weaponHash)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger

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_WEAPONTYPE_SLOT(Hash weaponHash)
Hash
0x4215460B9B8B7FA0

Open in the interactive natives reference