RedM Natives

ADD_CUSTOM_FORMATION_LOCATION

Hash0x4E23CD07BD161E06
Runtime nameAddCustomFormationLocation
NamespacePED
SideClient
NameOfficial
Docs
Since build1207

Signature

void ADD_CUSTOM_FORMATION_LOCATION(int groupId, float x, float y, float z, int position);

Parameters

NameTypeDescription
groupIdint—
xfloat—
yfloat—
zfloat—
positionint—

Returns void

Usage

Lua
AddCustomFormationLocation(groupId, x, y, z, position)

-- always works, by hash
Citizen.InvokeNative(0x4E23CD07BD161E06, groupId, x, y, z, position)
JavaScript and C#
JavaScript
AddCustomFormationLocation(groupId, x, y, z, position);

// by hash
Citizen.invokeNative('0x4E23CD07BD161E06', groupId, x + 0.0000001, y + 0.0000001, z + 0.0000001, position);
C#
Function.Call((Hash)0x4E23CD07BD161E06, groupId, x, y, z, position);
  • 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.