hasPcCheatWithHashBeenActivated
HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED0x557E43C447E700A8The 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.
hasPcCheatWithHashBeenActivated(hash: Hash): booleanhasPcCheatWithHashBeenActivated(hash: Hash): booleanUsage
JavaScript
const result = hasPcCheatWithHashBeenActivated(hash);Lua
local result = hasPcCheatWithHashBeenActivated(hash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
hash | Hash | number | integer |
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.
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