getHashNameForProp

GET_HASH_NAME_FOR_PROP0x5D6160275CAEC8DD

The GTA V native GET_HASH_NAME_FOR_PROP of the EXTRAMETADATA namespace, as LS:MP client scripts call it: the global function getHashNameForProp, in JavaScript and in Lua.

SignatureJavaScript
getHashNameForProp(
  entity: Entity,
  componentId: number,
  propIndex: number,
  propTextureIndex: number
): Hash
SignatureLua
getHashNameForProp(
  entity: Entity,
  componentId: integer,
  propIndex: integer,
  propTextureIndex: integer
): Hash

Usage

JavaScript
const hash = getHashNameForProp(entity, componentId, propIndex, propTextureIndex);
Lua
local hash = getHashNameForProp(entity, componentId, propIndex, propTextureIndex)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
componentIdintnumberinteger
propIndexintnumberinteger
propTextureIndexintnumberinteger

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
Shop metadata EXTRAMETADATA
In the game
Hash GET_HASH_NAME_FOR_PROP(Entity entity, int componentId, int propIndex, int propTextureIndex)
Hash
0x5D6160275CAEC8DD

Open in the interactive natives reference