ObjectClient

getWeaponTypeFromPickupType

GET_WEAPON_TYPE_FROM_PICKUP_TYPE0x08F96CA6C551AD51

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

SignatureJavaScript
getWeaponTypeFromPickupType(pickupHash: Hash): Hash
SignatureLua
getWeaponTypeFromPickupType(pickupHash: Hash): Hash

Usage

JavaScript
const hash = getWeaponTypeFromPickupType(pickupHash);
Lua
local hash = getWeaponTypeFromPickupType(pickupHash)

Parameters

ParameterTypeJavaScriptLua
pickupHashHashnumberinteger

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.

Reference

Namespace
Object OBJECT
In the game
Hash GET_WEAPON_TYPE_FROM_PICKUP_TYPE(Hash pickupHash)
Hash
0x08F96CA6C551AD51
Formerly
_GET_WEAPON_HASH_FROM_PICKUP

Open in the interactive natives reference