MiscClientBlocked

stringToInt

STRING_TO_INT0x5A5F40FE637EB584

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

SignatureJavaScript
stringToInt(string: string): [ok: boolean, outInteger: number]
SignatureLua
stringToInt(string: string): boolean, integer
✕
Blocked for scripts: Replaced by the language

This is a game-side helper your language already covers: bit operators, or number and string conversion.

Calling it raises disabled by LSMP script policy, which try / catch (JavaScript) or pcall (Lua) can intercept. Nothing reaches the game. See Blocked natives.

Reference

Namespace
Misc MISC
In the game
BOOL STRING_TO_INT(const char* string, int* outInteger)
Hash
0x5A5F40FE637EB584

Open in the interactive natives reference