ScriptClient

hasScriptWithNameHashLoaded

HAS_SCRIPT_WITH_NAME_HASH_LOADED0x5F0F0C783EB16C04

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

SignatureJavaScript
hasScriptWithNameHashLoaded(scriptHash: Hash): boolean
SignatureLua
hasScriptWithNameHashLoaded(scriptHash: Hash): boolean

Usage

JavaScript
const result = hasScriptWithNameHashLoaded(scriptHash);
Lua
local result = hasScriptWithNameHashLoaded(scriptHash)

Parameters

ParameterTypeJavaScriptLua
scriptHashHashnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Script SCRIPT
In the game
BOOL HAS_SCRIPT_WITH_NAME_HASH_LOADED(Hash scriptHash)
Hash
0x5F0F0C783EB16C04
Formerly
_HAS_STREAMED_SCRIPT_LOADED

Open in the interactive natives reference