Natives PATHFIND 0xADD95C7005C4A197 float CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS (float x1, float y1, float z1, float x2, float y2, float z2); Documentation Community 0
Property
Value
Native Name
CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS
Hash
0xADD95C7005C4A197
Return Type
float
Parameters
x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float)
Description: Calculates the travel distance between a set of points.
Doesn't seem to correlate with distance on gps sometimes.
This function returns the value 100000.0 over long distances, seems to be a failure mode result, potentially occurring when not all path nodes are loaded into pathfind.
Back to PATHFIND Before you callCitizen.InvokeNative in CitizenFX Lua does not auto-marshal float/Vector3 returns — the result comes back wrong (community reports both a plain boolean and only-the-x-component-as-a-number); for these returns use the named Lua wrapper (e.g. GetEntityVelocity, GetPedBoneCoords, GetOffsetFromEntityInWorldCoords) or append Citizen.ResultAsVector() / Citizen.ResultAsFloat() as the final InvokeNative argument, and in JS/TS (no wrapper exists) Citizen.resultAsVector() / resultAsFloat() is mandatory; plain int/handle and void returns are unaffected.
Let your AI read the fine print. Native signatures, warnings, and community context. Directly in your editor.
Connect via MCP