RedM Natives

VAR_STRING

It is also required to pass at least one extra argument (this must be a text label string or hash).

Hash0xFA925AC00EB830B9
Runtime nameVarString
NamespaceMISC
SideClient
NameOfficial
Docs
Since build1207

Signature

const char* VAR_STRING(int flags, Any ..., ...);

Parameters

NameTypeDescription
flagsint—
...Any—

Returns const char*

Description

alloc8or RDR3 NativeDB

Note: The first bit in 'flags' must not be set.
It is also required to pass at least one extra argument (this must be a text label string or hash).
When passing a hash, flags should be 0.

femga rdr3_discoveries · research notes

0xFA925AC00EB830B9      (By smallos)
Turns out if you change some values in it, like so
local str = Citizen.InvokeNative(0xFA925AC00EB830B9, 2, "CASH_STRING", amountInCents, Citizen.ResultAsLong())

It'll format your string nicely in cents and in the right format https://smallo.wtf/i/MqkVN5W.png
Now I wonder if it changes the money icon to match locale

Usage

Lua
local retval = VarString(flags, ___)

-- always works, by hash
local retval = Citizen.InvokeNative(0xFA925AC00EB830B9, flags, ___, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = VarString(flags, ___);

// by hash
const retval = Citizen.invokeNative('0xFA925AC00EB830B9', flags, ___, Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0xFA925AC00EB830B9, flags, ___);

Sources

alloc8or RDR3 NativeDB · femga rdr3_discoveries

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