ScriptClient

hasScriptLoaded

HAS_SCRIPT_LOADED0xE6CC9F3BA0FB9EF1

The GTA V native HAS_SCRIPT_LOADED of the SCRIPT namespace, as LS:MP client scripts call it: the global function hasScriptLoaded, in JavaScript and in Lua.

SignatureJavaScript
hasScriptLoaded(scriptName: string): boolean
SignatureLua
hasScriptLoaded(scriptName: string): boolean

Usage

JavaScript
const result = hasScriptLoaded(scriptName);
Lua
local result = hasScriptLoaded(scriptName)

Parameters

ParameterTypeJavaScriptLua
scriptNamestringstringstring

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

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

Reference

Namespace
Script SCRIPT
In the game
BOOL HAS_SCRIPT_LOADED(const char* scriptName)
Hash
0xE6CC9F3BA0FB9EF1

Open in the interactive natives reference