native
pathfind
Methods
set_roads_in_area
function native.pathfind.set_roads_in_area(x_min: float, y_min: float, z_min: float, x_max: float, y_max: float, z_max: float, p6: int, p7: int, p8: int): void
set_roads_in_angled_area
function native.pathfind.set_roads_in_angled_area(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: int, p10: int): void
set_roads_in_volume
function native.pathfind.set_roads_in_volume(volume: int, p1: bool, p2: bool, p3: bool): void
reset_roads_in_volume
function native.pathfind.reset_roads_in_volume(volume: int, p1: bool): void
set_roads_back_to_original
function native.pathfind.set_roads_back_to_original(x_min: float, y_min: float, z_min: float, x_max: float, y_max: float, z_max: float, p6: int, p7: int): void
set_roads_back_to_original_in_angled_area
function native.pathfind.set_roads_back_to_original_in_angled_area(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int): void
_0xafe2ae66f6251c66
function native.pathfind._0xafe2ae66f6251c66(x_min: float, y_min: float, z_min: float, x_max: float, y_max: float, z_max: float, p6: int, p7: int): void
_0x4358bcf14c91761c
function native.pathfind._0x4358bcf14c91761c(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: int): void
_0xb03944057fd735ba
function native.pathfind._0xb03944057fd735ba(p0: int, p1: int, p2: int): void
_0x6c3f12eceb6d2e2a
function native.pathfind._0x6c3f12eceb6d2e2a(x_min: float, y_min: float, z_min: float, x_max: float, y_max: float, z_max: float, p6: int, p7: int): void
_0x5a4e1a41e3a02ad0
function native.pathfind._0x5a4e1a41e3a02ad0(p0: int, p1: int, p2: int): void
get_closest_vehicle_node
function native.pathfind.get_closest_vehicle_node(x: float, y: float, z: float, out_position: ref vec3, node_type: int, p5: float, p6: float): bool
_0xca27a86caa4e98ed
function native.pathfind._0xca27a86caa4e98ed(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int): int
get_closest_vehicle_node_with_heading
function native.pathfind.get_closest_vehicle_node_with_heading(x: float, y: float, z: float, out_position: ref vec3, out_heading: ptr int, node_type: int, p6: float, p7: float): bool
get_nth_closest_vehicle_node
function native.pathfind.get_nth_closest_vehicle_node(x: float, y: float, z: float, nth_closest: int, out_position: ref vec3, unknown1: int, unknown2: float, unknown3: int): bool
get_nth_closest_vehicle_node_id
function native.pathfind.get_nth_closest_vehicle_node_id(x: float, y: float, z: float, nth: int, nodetype: int, p5: float, p6: float): int
get_nth_closest_vehicle_node_with_heading
function native.pathfind.get_nth_closest_vehicle_node_with_heading(x: float, y: float, z: float, nth_closest: int, out_position: ref vec3, heading: ptr int, unknown1: ptr int, unknown2: int, unknown3: float, unknown4: float): bool
get_nth_closest_vehicle_node_id_with_heading
Returns the nth closest vehicle node with a heading to a coord
function native.pathfind.get_nth_closest_vehicle_node_id_with_heading(x: float, y: float, z: float, nth_closest: int, return_heading: ptr int, return_num_lanes: ptr int, node_flags: int, z_measure_mult: float, z_tolerance: float): int
get_nth_closest_vehicle_node_favour_direction
function native.pathfind.get_nth_closest_vehicle_node_favour_direction(x: float, y: float, z: float, desired_x: float, desired_y: float, desired_z: float, nth_closest: int, out_position: ref vec3, out_heading: ptr int, nodetype: int, p10: int, p11: int): bool
is_vehicle_node_id_valid
Returns true if the id is non zero.
function native.pathfind.is_vehicle_node_id_valid(vehicle_node_id: int): bool
get_vehicle_node_position
function native.pathfind.get_vehicle_node_position(node_id: int, out_position: ref vec3): void
get_vehicle_node_is_switched_off
function native.pathfind.get_vehicle_node_is_switched_off(node_id: int): bool
get_closest_road
function native.pathfind.get_closest_road(x: float, y: float, z: float, p3: float, p4: int, p5: ref vec3, p6: ref vec3, p7: ptr int, p8: ptr int, p9: ptr int, p10: bool): int
are_nodes_loaded_for_area
function native.pathfind.are_nodes_loaded_for_area(x1: float, y1: float, x2: float, y2: float): bool
request_path_nodes_in_area_this_frame
Old name: REQUEST_PATHS_PREFER_ACCURATE_BOUNDINGSTRUCT
function native.pathfind.request_path_nodes_in_area_this_frame(x1: float, y1: float, x2: float, y2: float): bool
get_random_vehicle_node
function native.pathfind.get_random_vehicle_node(x: float, y: float, z: float, radius: float, min_lanes: int, avoid_dead_ends: bool, avoid_highways: bool, out_position: ref vec3, node_id: ptr int): bool
_get_spawn_data_for_road_node
function native.pathfind._get_spawn_data_for_road_node(node_id: int, x: float, y: float, z: float, out_coords: ref vec3, heading: ptr int): void
is_point_on_road
Gets a value indicating whether the specified position is on a road.
function native.pathfind.is_point_on_road(x: float, y: float, z: float, vehicle: int): bool
set_ped_paths_in_area
function native.pathfind.set_ped_paths_in_area(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, unknown: bool, p7: int): void
_0xe5ef9de716ff737e
function native.pathfind._0xe5ef9de716ff737e(p0: int, p1: int, p2: int): void
get_safe_coord_for_ped
function native.pathfind.get_safe_coord_for_ped(x: float, y: float, z: float, on_ground: bool, out_position: ref vec3, flags: int): bool
set_ped_paths_back_to_original
function native.pathfind.set_ped_paths_back_to_original(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int): void
_0xcf213a5fc3abfc08
function native.pathfind._0xcf213a5fc3abfc08(p0: int, p1: int, p2: int): void
add_navmesh_required_region
function native.pathfind.add_navmesh_required_region(x: float, y: float, radius: float): void
is_navmesh_loaded_in_area
Returns whether navmesh for the region is loaded.
function native.pathfind.is_navmesh_loaded_in_area(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float): bool
get_num_navmeshes_existing_in_area
function native.pathfind.get_num_navmeshes_existing_in_area(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float): int
_navmesh_activate_swap
function native.pathfind._navmesh_activate_swap(name: string): bool
_navmesh_deactivate_swap
function native.pathfind._navmesh_deactivate_swap(name: string): bool
_navmesh_is_swap_active
function native.pathfind._navmesh_is_swap_active(name: string): bool
_navmesh_does_swap_exist
function native.pathfind._navmesh_does_swap_exist(name: string): bool
_0x5a3b54addf5472a3
function native.pathfind._0x5a3b54addf5472a3(p0: string): int
_0xa33914b00ca55756
function native.pathfind._0xa33914b00ca55756(p0: string, p1: int): ptr int
_navmesh_assign_navmesh_to_vehicle
function native.pathfind._navmesh_assign_navmesh_to_vehicle(vehicle: int, nav_mesh_name: string): bool
add_navmesh_blocking_object
function native.pathfind.add_navmesh_blocking_object(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: bool, p8: int): int
remove_navmesh_blocking_object
function native.pathfind.remove_navmesh_blocking_object(p0: int): void
does_navmesh_blocking_object_exist
function native.pathfind.does_navmesh_blocking_object_exist(p0: int): bool
_add_navmesh_blocking_volume
function native.pathfind._add_navmesh_blocking_volume(volume: int, flags: int): bool
_remove_navmesh_blocking_volume
function native.pathfind._remove_navmesh_blocking_volume(volume: int): void
_does_navmesh_blocking_volume_exist
function native.pathfind._does_navmesh_blocking_volume_exist(volume: int): bool
_0x6dad6630ae4a74cb
function native.pathfind._0x6dad6630ae4a74cb(p0: int, p1: int): void
navmesh_request_path
Starts a nav mesh query for a path between coordinates with a given ped and returns a handle to be validated by _NAVMESH_REQUESTED_QUERY_STATUS and then _NAVMESH_REQUESTED_PATH_WAYPOINTS_FOUND
Only bit flag values used in scripts are 0, 23, and 29. 23 is used with dogs and horses. 29 with legendary animals.
function native.pathfind.navmesh_request_path(ped: int, x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, bit_flag: int): int
_navmesh_clear_requested_path
Called in scripts after finished with requested pathes. Immediately resets all values connected to the path handle except query status, which changes from 1 to 2 before eventually becoming fully invalidated to 0.
function native.pathfind._navmesh_clear_requested_path(path: int): bool
_navmesh_requested_query_status
Returns eNavMeshQueryStatus enum eNavMeshQueryStatus { QS_NOT_FOUND, QS_COMPLETE, QS_PENDING };
It appears that the pending state of 2 is at least also used when cleaning up a request (_NAVMESH_CLEAR_REQUESTED_PATH) or if a request never completes. Eventually queries are invalidated and return 0.
Old name: _NAVMESH_QUERY_STATUS
function native.pathfind._navmesh_requested_query_status(path: int): int
_navmesh_requested_path_waypoints_found
Returns true if a path of waypoints was found. Waypoints can be retrieved with _NAVMESH_REQUESTED_PATH_NUM_WAYPOINTS and _NAVMESH_REQUESTED_PATH_WAYPOINT_BY_INDEX
function native.pathfind._navmesh_requested_path_waypoints_found(path: int): bool
_navmesh_requested_path_waypoints_terrain
Returns a bit flag for seemingly terrain within the waypoints in the path. Checked against bit value 2 to match water in the path, seems to always contain at least 1 though regardless of location/ped.
function native.pathfind._navmesh_requested_path_waypoints_terrain(path: int): int
_navmesh_requested_path_num_waypoints
Returns the number of waypoints for a requested path (NAVMESH_REQUEST_PATH) if the query is completed (_NAVMESH_REQUESTED_QUERY_STATUS). For use with _NAVMESH_REQUESTED_PATH_WAYPOINT_BY_INDEX
function native.pathfind._navmesh_requested_path_num_waypoints(path: int): int
_navmesh_requested_path_waypoint_by_index
Returns a vector3 waypoint at the specified index for a path. Use _NAVMESH_REQUESTED_PATH_NUM_WAYPOINTS to get available indexes.
function native.pathfind._navmesh_requested_path_waypoint_by_index(path: int, waypoint_index: int): vec3
get_approx_floor_for_point
Returns CGameWorldHeightMap's minimum Z value at specified point (grid node).
function native.pathfind.get_approx_floor_for_point(x: float, y: float): float
set_ambient_ped_range_multiplier_this_frame
function native.pathfind.set_ambient_ped_range_multiplier_this_frame(multiplier: float): void
set_ignore_no_gps_flag
nullsub, doesn't do anything
function native.pathfind.set_ignore_no_gps_flag(toggle: bool): void
get_gps_blip_route_length
function native.pathfind.get_gps_blip_route_length(): int
_0xefc535c9faf563b3
function native.pathfind._0xefc535c9faf563b3(p0: int): int
_0x665b21666351cb37
function native.pathfind._0x665b21666351cb37(p0: int, p1: int, p2: int): int
get_gps_blip_route_found
function native.pathfind.get_gps_blip_route_found(): bool
_0x54f4d7b6670fbb5a
function native.pathfind._0x54f4d7b6670fbb5a(p0: int, p1: int, p2: int, p3: int, p4: int): int
_0x34c9af25649172d0
function native.pathfind._0x34c9af25649172d0(p0: int): void
_0xf2a2177ac848b3a8
GPS disabled zone: p1 = 0
Clearing GPS disabled zone: p1 = 1
function native.pathfind._0xf2a2177ac848b3a8(volume: int, p1: int, p2: int): void
_0x4bdebea5702b97a9
function native.pathfind._0x4bdebea5702b97a9(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int): void
_0x264e9a5cd78c338f
function native.pathfind._0x264e9a5cd78c338f(p0: int): void
_0x869a7015bd4606e9
function native.pathfind._0x869a7015bd4606e9(p0: int): void
_simulated_route_create
function native.pathfind._simulated_route_create(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, p6: int): int
_simulated_route_delete
function native.pathfind._simulated_route_delete(p0: int): void
_simulated_route_exists
function native.pathfind._simulated_route_exists(p0: int): bool
simulated_route_is_loaded
function native.pathfind.simulated_route_is_loaded(p0: int): bool
simulated_route_travel_to_point
function native.pathfind.simulated_route_travel_to_point(p0: int, p1: float, p2: float): void
simulated_route_get_eta
function native.pathfind.simulated_route_get_eta(p0: int): float