RedM Natives

GET_STRING_FROM_HASH_KEY

Returns the label text given the hash.

Hash0xBD5DD5EAE2B6CE14
Runtime nameGetStringFromHashKey
NamespaceHUD
SideClient
NameOfficial
Docs
Since build1207

Signature

const char* GET_STRING_FROM_HASH_KEY(Hash labelHash);

Parameters

NameTypeDescription
labelHashHash—

Returns const char*

Description

Returns the label text given the hash.

Old name: _GET_LABEL_TEXT_BY_HASH

Usage

Lua
local retval = GetStringFromHashKey(labelHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0xBD5DD5EAE2B6CE14, labelHash, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = GetStringFromHashKey(labelHash);

// by hash
const retval = Citizen.invokeNative('0xBD5DD5EAE2B6CE14', labelHash, Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0xBD5DD5EAE2B6CE14, labelHash);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.