RedM Natives

HAS_SCRIPT_LOADED

Returns if a script has been loaded into the game.

Hash0xE97BD36574F8B0A6
Runtime nameHasScriptLoaded
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xE6CC9F3BA0FB9EF1

Signature

BOOL HAS_SCRIPT_LOADED(const char* scriptName);

Parameters

NameTypeDescription
scriptNameconst char*—

Returns BOOL

Description

Returns if a script has been loaded into the game. Used to see if a script was loaded after requesting.

Usage

Lua
local retval = HasScriptLoaded(scriptName)

-- always works, by hash
local retval = Citizen.InvokeNative(0xE97BD36574F8B0A6, scriptName, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = HasScriptLoaded(scriptName);

// by hash
const retval = Citizen.invokeNative('0xE97BD36574F8B0A6', scriptName, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xE97BD36574F8B0A6, scriptName);

Sources

alloc8or RDR3 NativeDB

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