RedM Natives

_READ_INT_AS_FLOAT

Reads the passed value as floating point value and returns it.

Hash0xD2C9126410DFA1B2
Runtime nameReadIntAsFloat
NamespaceMISC
SideClient
NameCommunity guess
Docs
Since build1207

Signature

float _READ_INT_AS_FLOAT(int value);

Parameters

NameTypeDescription
valueint—

Returns float

Description

Reads the passed value as floating point value and returns it.
Example: _READ_INT_AS_FLOAT(0x3F800000) returns 1.0f because 0x3F800000 is the hexadecimal representation of 1.0f.

Usage

Lua
local retval = ReadIntAsFloat(value)

-- always works, by hash
local retval = Citizen.InvokeNative(0xD2C9126410DFA1B2, value, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = ReadIntAsFloat(value);

// by hash
const retval = Citizen.invokeNative('0xD2C9126410DFA1B2', value, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
float retval = Function.Call<float>((Hash)0xD2C9126410DFA1B2, value);
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.