RedM Natives

BG_GET_SCRIPT_ID_FROM_NAME_HASH

Hash0x829CD22E043A2577
Runtime nameBgGetScriptIdFromNameHash
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x829CD22E043A2577

Not called by the game's own scripts — behaviour may be incomplete.

Signature

int BG_GET_SCRIPT_ID_FROM_NAME_HASH(Hash p0);

Parameters

NameTypeDescription
p0Hash—

Returns int

Usage

Lua
local retval = BgGetScriptIdFromNameHash(p0)

-- always works, by hash
local retval = Citizen.InvokeNative(0x829CD22E043A2577, p0, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = BgGetScriptIdFromNameHash(p0);

// by hash
const retval = Citizen.invokeNative('0x829CD22E043A2577', p0, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x829CD22E043A2577, p0);
  • 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.