ObjectClient

getPickupTypeFromWeaponHash

GET_PICKUP_TYPE_FROM_WEAPON_HASH0xD6429A016084F1A5

The GTA V native GET_PICKUP_TYPE_FROM_WEAPON_HASH of the OBJECT namespace, as LS:MP client scripts call it: the global function getPickupTypeFromWeaponHash, in JavaScript and in Lua.

SignatureJavaScript
getPickupTypeFromWeaponHash(weaponHash: Hash): Hash
SignatureLua
getPickupTypeFromWeaponHash(weaponHash: Hash): Hash

Usage

JavaScript
const hash = getPickupTypeFromWeaponHash(weaponHash);
Lua
local hash = getPickupTypeFromWeaponHash(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.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns the pickup hash for the given weapon hash

Reference

Namespace
Object OBJECT
In the game
Hash GET_PICKUP_TYPE_FROM_WEAPON_HASH(Hash weaponHash)
Hash
0xD6429A016084F1A5
Introduced
Game build 1290 legacy numbering
Formerly
_GET_PICKUP_HASH_FROM_WEAPON

Open in the interactive natives reference