_GET_SPAWN_DATA_FOR_ROAD_NODE
Hash
0xA3791B915B8B84C6Runtime name
GetSpawnDataForRoadNodeNamespacePATH
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
| Name | Type | Description |
|---|---|---|
nodeId | int | — |
x | float | — |
y | float | — |
z | float | — |
outCoords | Vector3* | — |
heading | float* | — |
Returns void
Usage
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#
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());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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.