GET_HASH_KEY
Computes a hash for the given string.
Hash
0xFD340785ADF8CFB7Runtime name
GetHashKeyNamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xD24D37CC275948CCSignature
Hash GET_HASH_KEY(const char* string);Parameters
| Name | Type | Description |
|---|---|---|
string | const char* | — |
Returns Hash
Description
Computes a hash for the given string. It is hashed using Jenkins' One-at-a-Time hash algorithm (https://en.wikipedia.org/wiki/Jenkins_hash_function)
Note: this implementation is case-insensitive.
Usage
local retval = GetHashKey(string)
-- always works, by hash
local retval = Citizen.InvokeNative(0xFD340785ADF8CFB7, string, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetHashKey(string);
// by hash
const retval = Citizen.invokeNative('0xFD340785ADF8CFB7', string, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xFD340785ADF8CFB7, string);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.