MiscClient

hasPcCheatWithHashBeenActivated

HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED0x557E43C447E700A8

The GTA V native HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED of the MISC namespace, as LS:MP client scripts call it: the global function hasPcCheatWithHashBeenActivated, in JavaScript and in Lua.

SignatureJavaScript
hasPcCheatWithHashBeenActivated(hash: Hash): boolean
SignatureLua
hasPcCheatWithHashBeenActivated(hash: Hash): boolean

Usage

JavaScript
const result = hasPcCheatWithHashBeenActivated(hash);
Lua
local result = hasPcCheatWithHashBeenActivated(hash)

Parameters

ParameterTypeJavaScriptLua
hashHashnumberinteger

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.

Get inputted "Cheat code", for example:

while (TRUE)
{
    if (hasPcCheatWithHashBeenActivated(${fugitive}))
    {
       // Do something.
    }
    SYSTEM::WAIT(0);
}

Calling this will also set the last saved string hash to zero.

Reference

Namespace
Misc MISC
In the game
BOOL HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED(Hash hash)
Hash
0x557E43C447E700A8
Formerly
_HAS_CHEAT_STRING_JUST_BEEN_ENTERED

Open in the interactive natives reference