_READ_INT_AS_FLOAT
Reads the passed value as floating point value and returns it.
Hash
0xD2C9126410DFA1B2Runtime name
ReadIntAsFloatNamespaceMISC
SideClient
NameCommunity guess
Docs
Since build1207
Signature
float _READ_INT_AS_FLOAT(int value);Parameters
| Name | Type | Description |
|---|---|---|
value | int | — |
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
local retval = ReadIntAsFloat(value)
-- always works, by hash
local retval = Citizen.InvokeNative(0xD2C9126410DFA1B2, value, Citizen.ResultAsFloat())JavaScript and C#
const retval = ReadIntAsFloat(value);
// by hash
const retval = Citizen.invokeNative('0xD2C9126410DFA1B2', value, Citizen.returnResultAnyway(), Citizen.resultAsFloat());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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.