NAVMESH_REQUEST_PATH
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
int NAVMESH_REQUEST_PATH(Ped ped, float x1, float y1, float z1, float x2, float y2, float z2, int bitFlag); // 0x348F211CA2404039 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | x1 | float |
| 3 | y1 | float |
| 4 | z1 | float |
| 5 | x2 | float |
| 6 | y2 | float |
| 7 | z2 | float |
| 8 | bitFlag | int |
Facts
| 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.
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)// 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)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
);Related PATH natives
- _NAVMESH_ASSIGN_NAVMESH_TO_VEHICLE
- _NAVMESH_CLEAR_REQUESTED_PATH
- _NAVMESH_REQUESTED_PATH_NUM_WAYPOINTS
- _NAVMESH_REQUESTED_PATH_QUERY_STATUS
- _NAVMESH_REQUESTED_PATH_WAYPOINT_BY_INDEX
- _NAVMESH_REQUESTED_PATH_WAYPOINTS_FOUND
- _NAVMESH_REQUESTED_PATH_WAYPOINTS_TERRAIN
- REQUEST_PATH_NODES_IN_AREA_THIS_FRAME
- _ADD_NAVMESH_BLOCKING_VOLUME
- _DOES_NAVMESH_BLOCKING_VOLUME_EXIST
- _NAVMESH_ACTIVATE_SWAP
- _NAVMESH_DEACTIVATE_SWAP
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.