ScriptClient

getHashOfThisScriptName

GET_HASH_OF_THIS_SCRIPT_NAME0x8A1C8B1738FFE87E

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

SignatureJavaScript
getHashOfThisScriptName(): Hash
SignatureLua
getHashOfThisScriptName(): Hash

Usage

JavaScript
const hash = getHashOfThisScriptName();
Lua
local hash = getHashOfThisScriptName()

Parameters

None.

Returns

Hash JavaScript number, Lua integer

A game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.

Reference

Namespace
Script SCRIPT
In the game
Hash GET_HASH_OF_THIS_SCRIPT_NAME()
Hash
0x8A1C8B1738FFE87E
Formerly
_GET_THIS_SCRIPT_HASH

Open in the interactive natives reference