The Lab
MISC native

_GET_STRING_FROM_FLOAT

returns const char*2 paramsbuild 1207

Returns value formatted as a string with digits decimal places.

Signature

C
const char* _GET_STRING_FROM_FLOAT(float value, int digits); // 0x2B6846401D68E563 b1207

Parameters

#NameType
1valuefloat
2digitsint

Facts

Facts about _GET_STRING_FROM_FLOAT
Name
_GET_STRING_FROM_FLOAT
Hash
0x2B6846401D68E563
Namespace
Returns
const char*
Game build
1207

Examples

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

Lua
local result = Citizen.InvokeNative(0x2B6846401D68E563, -- _GET_STRING_FROM_FLOAT
  0.0, -- float value
  0, -- int digits
  Citizen.ResultAsString()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x2B6846401D68E563", // _GET_STRING_FROM_FLOAT
  0.0, // float value
  0, // int digits
  Citizen.resultAsString()
);
console.log(result)
C#
string result = Function.Call<string>((Hash)0x2B6846401D68E563, // _GET_STRING_FROM_FLOAT
  0.0f, // float value
  0 // int digits
);
All MISC natives

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