RedM Natives

SC_PRESENCE_ATTR_SET_FLOAT_EX

Hash0x00000000467F4CAA
Runtime nameScPresenceAttrSetFloatEx
NamespaceSOCIALCLUB
SideClient
NameOfficial
Docs
Since build1207

Not called by the game's own scripts — behaviour may be incomplete.

Signature

BOOL SC_PRESENCE_ATTR_SET_FLOAT_EX(const char* attrName, float value, BOOL p2);

Parameters

NameTypeDescription
attrNameconst char*—
valuefloat—
p2BOOL—

Returns BOOL

Usage

Lua
local retval = ScPresenceAttrSetFloatEx(attrName, value, p2)

-- always works, by hash
local retval = Citizen.InvokeNative(0x00000000467F4CAA, attrName, value, p2, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = ScPresenceAttrSetFloatEx(attrName, value, p2);

// by hash
const retval = Citizen.invokeNative('0x00000000467F4CAA', attrName, value + 0.0000001, p2, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x00000000467F4CAA, attrName, value, p2);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

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