The Lab
MISC native

STRING_TO_INT

returns BOOL2 paramsbuild 1207

Parses string as an integer and writes it to outInteger. Returns a boolean describing the outcome of the conversion.

Signature

C
BOOL STRING_TO_INT(const char* string, int* outInteger); // 0xF2DD2298B3AF23E2 b1207

Parameters

#NameType
1stringconst char*
2outIntegerint* (out pointer)

Facts

Facts about STRING_TO_INT
Name
STRING_TO_INT
Hash
0xF2DD2298B3AF23E2
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, outInteger = Citizen.InvokeNative(0xF2DD2298B3AF23E2, -- STRING_TO_INT
  "text", -- const char* string
  Citizen.PointerValueInt(), -- int* outInteger
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, outInteger] = Citizen.invokeNative("0xF2DD2298B3AF23E2", // STRING_TO_INT
  "text", // const char* string
  Citizen.pointerValueInt(), // int* outInteger
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var outIntegerArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xF2DD2298B3AF23E2, // STRING_TO_INT
  "text", // const char* string
  outIntegerArg // int* outInteger
);
int outInteger = outIntegerArg.GetResult<int>();
All MISC natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.