MiscClient

getHashKey

GET_HASH_KEY0xD24D37CC275948CC

The GTA V native GET_HASH_KEY of the MISC namespace, as LS:MP client scripts call it: the global function getHashKey, in JavaScript and in Lua.

SignatureJavaScript
getHashKey(string: string): Hash
SignatureLua
getHashKey(string: string): Hash

Usage

JavaScript
const hash = getHashKey(string);
Lua
local hash = getHashKey(string)

Parameters

ParameterTypeJavaScriptLua
stringstringstringstring

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.

On LS:MP

✓
Same as lsmp.hash

The hash comes back unsigned, equal to lsmp.hash for the same name. Every Hash parameter accepts it, signed or not.

Notes

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

This native converts its past string to hash. It is hashed using jenkins one at a time method.

Reference

Namespace
Misc MISC
In the game
Hash GET_HASH_KEY(const char* string)
Hash
0xD24D37CC275948CC

Open in the interactive natives reference