The Lab
PATH native

NAVMESH_REQUEST_PATH

returns int8 paramsbuild 1207

Requests an asynchronous navmesh path for ped between the two points and returns a path request id.

Poll the result with the _NAVMESH_REQUESTED_PATH_* natives and release it with _NAVMESH_CLEAR_REQUESTED_PATH.

Signature

C
int NAVMESH_REQUEST_PATH(Ped ped, float x1, float y1, float z1, float x2, float y2, float z2, int bitFlag); // 0x348F211CA2404039 b1207

Parameters

#NameType
1pedPed
2x1float
3y1float
4z1float
5x2float
6y2float
7z2float
8bitFlagint

Facts

Facts about NAVMESH_REQUEST_PATH
Name
NAVMESH_REQUEST_PATH
Hash
0x348F211CA2404039
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x348F211CA2404039, -- NAVMESH_REQUEST_PATH
  PlayerPedId(), -- Ped ped
  0.0, -- float x1
  0.0, -- float y1
  0.0, -- float z1
  0.0, -- float x2
  0.0, -- float y2
  0.0, -- float z2
  0, -- int bitFlag
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x348F211CA2404039", // NAVMESH_REQUEST_PATH
  PlayerPedId(), // Ped ped
  0.0, // float x1
  0.0, // float y1
  0.0, // float z1
  0.0, // float x2
  0.0, // float y2
  0.0, // float z2
  0, // int bitFlag
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0x348F211CA2404039, // NAVMESH_REQUEST_PATH
  API.PlayerPedId(), // Ped ped
  0.0f, // float x1
  0.0f, // float y1
  0.0f, // float z1
  0.0f, // float x2
  0.0f, // float y2
  0.0f, // float z2
  0 // int bitFlag
);
All PATH natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.