RedM Natives

DOES_SCRIPT_WITH_NAME_HASH_EXIST

Hash0xA34E89749F628284
Runtime nameDoesScriptWithNameHashExist
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF86AA3C56BA31381

Signature

BOOL DOES_SCRIPT_WITH_NAME_HASH_EXIST(Hash scriptHash);

Parameters

NameTypeDescription
scriptHashHash—

Returns BOOL

Usage

Lua
local retval = DoesScriptWithNameHashExist(scriptHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0xA34E89749F628284, scriptHash, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = DoesScriptWithNameHashExist(scriptHash);

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