pathfind¶
set_roads_in_area¶
void native.pathfind.set_roads_in_area(float x_min, float y_min, float z_min, float x_max, float y_max, float z_max, int p6, int p7, int p8)
set_roads_in_angled_area¶
void native.pathfind.set_roads_in_angled_area(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10)
set_roads_in_volume¶
void native.pathfind.set_roads_in_volume(int volume, bool p1, bool p2, bool p3)
reset_roads_in_volume¶
void native.pathfind.reset_roads_in_volume(int volume, bool p1)
set_roads_back_to_original¶
void native.pathfind.set_roads_back_to_original(float x_min, float y_min, float z_min, float x_max, float y_max, float z_max, int p6, int p7)
set_roads_back_to_original_in_angled_area¶
void native.pathfind.set_roads_back_to_original_in_angled_area(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8)
_0xafe2ae66f6251c66¶
void native.pathfind._0xafe2ae66f6251c66(float x_min, float y_min, float z_min, float x_max, float y_max, float z_max, int p6, int p7)
_0x4358bcf14c91761c¶
void native.pathfind._0x4358bcf14c91761c(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9)
_0xb03944057fd735ba¶
void native.pathfind._0xb03944057fd735ba(int p0, int p1, int p2)
_0x6c3f12eceb6d2e2a¶
void native.pathfind._0x6c3f12eceb6d2e2a(float x_min, float y_min, float z_min, float x_max, float y_max, float z_max, int p6, int p7)
_0x5a4e1a41e3a02ad0¶
void native.pathfind._0x5a4e1a41e3a02ad0(int p0, int p1, int p2)
get_closest_vehicle_node¶
bool native.pathfind.get_closest_vehicle_node(float x, float y, float z, ref vec3 out_position, int node_type, float p5, float p6)
_0xca27a86caa4e98ed¶
int native.pathfind._0xca27a86caa4e98ed(int p0, int p1, int p2, int p3, int p4, int p5, int p6)
get_closest_vehicle_node_with_heading¶
bool native.pathfind.get_closest_vehicle_node_with_heading(float x, float y, float z, ref vec3 out_position, ptr int out_heading, int node_type, float p6, float p7)
get_nth_closest_vehicle_node¶
bool native.pathfind.get_nth_closest_vehicle_node(float x, float y, float z, int nth_closest, ref vec3 out_position, int unknown1, float unknown2, int unknown3)
get_nth_closest_vehicle_node_id¶
int native.pathfind.get_nth_closest_vehicle_node_id(float x, float y, float z, int nth, int nodetype, float p5, float p6)
get_nth_closest_vehicle_node_with_heading¶
bool native.pathfind.get_nth_closest_vehicle_node_with_heading(float x, float y, float z, int nth_closest, ref vec3 out_position, ptr int heading, ptr int unknown1, int unknown2, float unknown3, float unknown4)
get_nth_closest_vehicle_node_id_with_heading¶
int native.pathfind.get_nth_closest_vehicle_node_id_with_heading(float x, float y, float z, int nth_closest, ptr int return_heading, ptr int return_num_lanes, int node_flags, float z_measure_mult, float z_tolerance)
get_nth_closest_vehicle_node_favour_direction¶
bool native.pathfind.get_nth_closest_vehicle_node_favour_direction(float x, float y, float z, float desired_x, float desired_y, float desired_z, int nth_closest, ref vec3 out_position, ptr int out_heading, int nodetype, int p10, int p11)
is_vehicle_node_id_valid¶
bool native.pathfind.is_vehicle_node_id_valid(int vehicle_node_id)
get_vehicle_node_position¶
void native.pathfind.get_vehicle_node_position(int node_id, ref vec3 out_position)
get_vehicle_node_is_switched_off¶
bool native.pathfind.get_vehicle_node_is_switched_off(int node_id)
get_closest_road¶
int native.pathfind.get_closest_road(float x, float y, float z, float p3, int p4, ref vec3 p5, ref vec3 p6, ptr int p7, ptr int p8, ptr int p9, bool p10)
are_nodes_loaded_for_area¶
bool native.pathfind.are_nodes_loaded_for_area(float x1, float y1, float x2, float y2)
request_path_nodes_in_area_this_frame¶
bool native.pathfind.request_path_nodes_in_area_this_frame(float x1, float y1, float x2, float y2)
get_random_vehicle_node¶
bool native.pathfind.get_random_vehicle_node(float x, float y, float z, float radius, int min_lanes, bool avoid_dead_ends, bool avoid_highways, ref vec3 out_position, ptr int node_id)
_get_spawn_data_for_road_node¶
void native.pathfind._get_spawn_data_for_road_node(int node_id, float x, float y, float z, ref vec3 out_coords, ptr int heading)
is_point_on_road¶
bool native.pathfind.is_point_on_road(float x, float y, float z, int vehicle)
set_ped_paths_in_area¶
void native.pathfind.set_ped_paths_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool unknown, int p7)
_0xe5ef9de716ff737e¶
void native.pathfind._0xe5ef9de716ff737e(int p0, int p1, int p2)
get_safe_coord_for_ped¶
bool native.pathfind.get_safe_coord_for_ped(float x, float y, float z, bool on_ground, ref vec3 out_position, int flags)
set_ped_paths_back_to_original¶
void native.pathfind.set_ped_paths_back_to_original(int p0, int p1, int p2, int p3, int p4, int p5, int p6)
_0xcf213a5fc3abfc08¶
void native.pathfind._0xcf213a5fc3abfc08(int p0, int p1, int p2)
add_navmesh_required_region¶
void native.pathfind.add_navmesh_required_region(float x, float y, float radius)
is_navmesh_loaded_in_area¶
bool native.pathfind.is_navmesh_loaded_in_area(float x1, float y1, float z1, float x2, float y2, float z2)
get_num_navmeshes_existing_in_area¶
int native.pathfind.get_num_navmeshes_existing_in_area(float p0, float p1, float p2, float p3, float p4, float p5)
_navmesh_activate_swap¶
bool native.pathfind._navmesh_activate_swap(string name)
_navmesh_deactivate_swap¶
bool native.pathfind._navmesh_deactivate_swap(string name)
_navmesh_is_swap_active¶
bool native.pathfind._navmesh_is_swap_active(string name)
_navmesh_does_swap_exist¶
bool native.pathfind._navmesh_does_swap_exist(string name)
_0x5a3b54addf5472a3¶
int native.pathfind._0x5a3b54addf5472a3(string p0)
_0xa33914b00ca55756¶
ptr int native.pathfind._0xa33914b00ca55756(string p0, int p1)
_navmesh_assign_navmesh_to_vehicle¶
bool native.pathfind._navmesh_assign_navmesh_to_vehicle(int vehicle, string nav_mesh_name)
add_navmesh_blocking_object¶
int native.pathfind.add_navmesh_blocking_object(float p0, float p1, float p2, float p3, float p4, float p5, float p6, bool p7, int p8)
remove_navmesh_blocking_object¶
void native.pathfind.remove_navmesh_blocking_object(int p0)
does_navmesh_blocking_object_exist¶
bool native.pathfind.does_navmesh_blocking_object_exist(int p0)
_add_navmesh_blocking_volume¶
bool native.pathfind._add_navmesh_blocking_volume(int volume, int flags)
_remove_navmesh_blocking_volume¶
void native.pathfind._remove_navmesh_blocking_volume(int volume)
_does_navmesh_blocking_volume_exist¶
bool native.pathfind._does_navmesh_blocking_volume_exist(int volume)
_0x6dad6630ae4a74cb¶
void native.pathfind._0x6dad6630ae4a74cb(int p0, int p1)
navmesh_request_path¶
int native.pathfind.navmesh_request_path(int ped, float x1, float y1, float z1, float x2, float y2, float z2, int bit_flag)
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.
_navmesh_clear_requested_path¶
bool native.pathfind._navmesh_clear_requested_path(int 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.
_navmesh_requested_query_status¶
int native.pathfind._navmesh_requested_query_status(int path)
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
_navmesh_requested_path_waypoints_found¶
bool native.pathfind._navmesh_requested_path_waypoints_found(int path)
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
_navmesh_requested_path_waypoints_terrain¶
int native.pathfind._navmesh_requested_path_waypoints_terrain(int path)
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.
_navmesh_requested_path_num_waypoints¶
int native.pathfind._navmesh_requested_path_num_waypoints(int path)
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
_navmesh_requested_path_waypoint_by_index¶
vec3 native.pathfind._navmesh_requested_path_waypoint_by_index(int path, int waypoint_index)
Returns a vector3 waypoint at the specified index for a path. Use _NAVMESH_REQUESTED_PATH_NUM_WAYPOINTS to get available indexes.
get_approx_floor_for_point¶
float native.pathfind.get_approx_floor_for_point(float x, float y)
set_ambient_ped_range_multiplier_this_frame¶
void native.pathfind.set_ambient_ped_range_multiplier_this_frame(float multiplier)
set_ignore_no_gps_flag¶
void native.pathfind.set_ignore_no_gps_flag(bool toggle)
get_gps_blip_route_length¶
int native.pathfind.get_gps_blip_route_length()
_0xefc535c9faf563b3¶
int native.pathfind._0xefc535c9faf563b3(int p0)
_0x665b21666351cb37¶
int native.pathfind._0x665b21666351cb37(int p0, int p1, int p2)
get_gps_blip_route_found¶
bool native.pathfind.get_gps_blip_route_found()
_0x54f4d7b6670fbb5a¶
int native.pathfind._0x54f4d7b6670fbb5a(int p0, int p1, int p2, int p3, int p4)
_0x34c9af25649172d0¶
void native.pathfind._0x34c9af25649172d0(int p0)
_0xf2a2177ac848b3a8¶
void native.pathfind._0xf2a2177ac848b3a8(int volume, int p1, int p2)
_0x4bdebea5702b97a9¶
void native.pathfind._0x4bdebea5702b97a9(int p0, int p1, int p2, int p3, int p4, int p5)
_0x264e9a5cd78c338f¶
void native.pathfind._0x264e9a5cd78c338f(int p0)
_0x869a7015bd4606e9¶
void native.pathfind._0x869a7015bd4606e9(int p0)
_simulated_route_create¶
int native.pathfind._simulated_route_create(float x1, float y1, float z1, float x2, float y2, float z2, int p6)
_simulated_route_delete¶
void native.pathfind._simulated_route_delete(int p0)
_simulated_route_exists¶
bool native.pathfind._simulated_route_exists(int p0)
simulated_route_is_loaded¶
bool native.pathfind.simulated_route_is_loaded(int p0)
simulated_route_travel_to_point¶
void native.pathfind.simulated_route_travel_to_point(int p0, float p1, float p2)
simulated_route_get_eta¶
float native.pathfind.simulated_route_get_eta(int p0)