RedM Natives

_GET_SPAWN_DATA_FOR_ROAD_NODE

Hash0xA3791B915B8B84C6
Runtime nameGetSpawnDataForRoadNode
NamespacePATH
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _GET_SPAWN_DATA_FOR_ROAD_NODE(int nodeId, float x, float y, float z, Vector3* outCoords, float* heading);

Parameters

NameTypeDescription
nodeIdint—
xfloat—
yfloat—
zfloat—
outCoordsVector3*—
headingfloat*—

Returns void

Usage

Lua
local outCoords, heading = GetSpawnDataForRoadNode(nodeId, x, y, z)

-- always works, by hash
local outCoords, heading = Citizen.InvokeNative(0xA3791B915B8B84C6, nodeId, x, y, z, Citizen.PointerValueVector(), Citizen.PointerValueFloat())
JavaScript and C#
JavaScript
const [outCoords, heading] = GetSpawnDataForRoadNode(nodeId, x, y, z);

// by hash
const [outCoords, heading] = Citizen.invokeNative('0xA3791B915B8B84C6', nodeId, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueVector(), Citizen.pointerValueFloat());
C#
var outCoords = new OutputArgument();
var heading = new OutputArgument();
Function.Call((Hash)0xA3791B915B8B84C6, nodeId, x, y, z, outCoords, heading);
// outCoords.GetResult<Vector3>()
// heading.GetResult<float>()
  • 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.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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