hasScriptLoaded
HAS_SCRIPT_LOADED0xE6CC9F3BA0FB9EF1The 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.
hasScriptLoaded(scriptName: string): booleanhasScriptLoaded(scriptName: string): booleanUsage
JavaScript
const result = hasScriptLoaded(scriptName);Lua
local result = hasScriptLoaded(scriptName)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
scriptName | string | string | string |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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