The FiveM developer’s field guide
Know the native.
Build the world.
Engine functions, framework docs, and game assets.
One reference. From the first lookup to the last line.
knowledge base
Explore / FiveM
Native reference
- PATHFINDvoid
0xAA76052DDA9BFC3E
Description not yet documented
0xAA76052DDA9BFC3E - PATHFINDAny
ADD_NAVMESH_BLOCKING_OBJECT
Creates a navmesh blocking object, vehicles will avoid driving through this area. Only 32 blocking objects may exist at a given time and must be manually managed. See [`REMOVE_NAVMESH_BLOCKING_OBJECT`](#\_0x46399A7895957C0E) and [`onResourceStop`](https://docs.fivem.net/docs/scripting-reference/events/list/onResourceStop/) ```cpp enum eBlockingObjectFlags { // Default Flag BLOCKING_OBJECT_DEFAULT = 0, // Blocking object will block wander paths BLOCKING_OBJECT_WANDERPATH = 1, // Blocking object will block (regular) shortest-paths BLOCKING_OBJECT_SHORTESTPATH = 2, // Blocking object will block flee paths BLOCKING_OBJECT_FLEEPATH = 4, // Blocking object will block all paths BLOCKING_OBJECT_ALLPATHS = 7, } ```
0xFCD5C8E06E502F5A - PATHFINDvoid
ADD_NAVMESH_REQUIRED_REGION
Description not yet documented
0x387EAD7EE42F6685 - PATHFINDBOOL
ARE_ALL_NAVMESH_REGIONS_LOADED
Description not yet documented
0x8415D95B194A3AEA - PATHFINDBOOL
ARE_NODES_LOADED_FOR_AREA
Description not yet documented
0xF7B79A50B905A30D - PATHFINDfloat
CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS
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.
0xADD95C7005C4A197 - PATHFINDvoid
CLEAR_GPS_DISABLED_ZONE_AT_INDEX
Clears a disabled GPS route area from a certain index previously set using [`SET_GPS_DISABLED_ZONE_AT_INDEX`](#\_0xD0BC1C6FB18EE154).
0x2801D0012266DF07 - PATHFINDvoid
DISABLE_NAVMESH_IN_AREA
Use this if you want to completely disable a large area of navmesh. For smaller areas, use [`ADD_NAVMESH_BLOCKING_OBJECT`](#\_0xFCD5C8E06E502F5A) instead.
0x4C8872D8CDBE1B8B - PATHFINDBOOL
DOES_NAVMESH_BLOCKING_OBJECT_EXIST
Description not yet documented
0x0EAEB0DB4B132399 - PATHFINDint
GENERATE_DIRECTIONS_TO_COORD
``` p3 is 0 in the only game script occurrence (trevor3) but 1 doesn't seem to make a difference distToNxJunction seems to be the distance in metres * 10.0f direction: 0 = This happens randomly during the drive for seemingly no reason but if you consider that this native is only used in trevor3, it seems to mean "Next frame, stop whatever's being said and tell the player the direction." 1 = Route is being calculated or the player is going in the wrong direction 2 = Please Proceed the Highlighted Route 3 = In (distToNxJunction) Turn Left 4 = In (distToNxJunction) Turn Right 5 = In (distToNxJunction) Keep Straight 6 = In (distToNxJunction) Turn Sharply To The Left 7 = In (distToNxJunction) Turn Sharply To The Right 8 = Route is being recalculated or the navmesh is confusing. This happens randomly during the drive but consistently at {2044.0358, 2996.6116, 44.9717} if you face towards the bar and the route needs you to turn right. In that particular case, it could be a bug with how the turn appears to be 270 deg. CCW instead of "right." Either way, this seems to be the engine saying "I don't know the route right now." return value set to 0 always ```
0xF90125F1F79ECDF8 - PATHFINDBOOL
GET_CLOSEST_MAJOR_VEHICLE_NODE
Same as [`GET_CLOSEST_VEHICLE_NODE`](#\_0x240A18690AE96513), but with the node flag `GCNF_INCLUDE_SWITCHED_OFF_NODES` set.
0x2EABE3B06F58C1BE - PATHFINDbool
GET_CLOSEST_ROAD
Finds an edge (node connection to another node) that satisfies the specified criteria.
0x132F52BBA570FE92 - PATHFINDBOOL
GET_CLOSEST_VEHICLE_NODE
```cpp enum eGetClosestNodeFlags { GCNF_INCLUDE_SWITCHED_OFF_NODES = 1, GCNF_INCLUDE_BOAT_NODES = 2, GCNF_IGNORE_SLIPLANES = 4, GCNF_IGNORE_SWITCHED_OFF_DEADENDS = 8, GCNF_GET_HEADING = 256, GCNF_FAVOUR_FACING = 512 } ```
0x240A18690AE96513 - PATHFINDBOOL
GET_CLOSEST_VEHICLE_NODE_WITH_HEADING
Same as [`GET_CLOSEST_VEHICLE_NODE`](#\_0x240A18690AE96513), but with the node flag `GCNF_GET_HEADING` set, causing the native to also return the heading.
0xFF071FB798B803B0 - PATHFINDBOOL
GET_GPS_BLIP_ROUTE_FOUND
Description not yet documented
0x869DAACBBE9FA006 - PATHFINDint
GET_GPS_BLIP_ROUTE_LENGTH
Description not yet documented
0xBBB45C3CF5C8AA85 - PATHFINDfloat
_GET_HEIGHTMAP_BOTTOM_Z_FOR_AREA
``` Returns CGameWorldHeightMap's minimum Z among all grid nodes that intersect with the specified rectangle. ```
0x3599D741C9AC6310 - PATHFINDfloat
_GET_HEIGHTMAP_BOTTOM_Z_FOR_POSITION
``` Returns CGameWorldHeightMap's minimum Z value at specified point (grid node). ```
0x336511A34F2E5185 - PATHFINDfloat
_GET_HEIGHTMAP_TOP_Z_FOR_AREA
``` Returns CGameWorldHeightMap's maximum Z among all grid nodes that intersect with the specified rectangle. ```
0x8ABE8608576D9CE3 - PATHFINDfloat
_GET_HEIGHTMAP_TOP_Z_FOR_POSITION
``` Returns CGameWorldHeightMap's maximum Z value at specified point (grid node). ```
0x29C24BFBED8AB8FB - PATHFINDint
GET_NEXT_GPS_DISABLED_ZONE_INDEX
Gets the next zone that has been disabled using SET_GPS_DISABLED_ZONE_AT_INDEX. ``` NativeDB Removed Parameter 1: int index ```
0xD3A6A0EF48823A8C - PATHFINDBOOL
GET_NTH_CLOSEST_VEHICLE_NODE
Same as [`GET_CLOSEST_VEHICLE_NODE`](#\_0x240A18690AE96513), but returns the nth closest node instead of the first.
0xE50E52416CCF948B - PATHFINDBOOL
GET_NTH_CLOSEST_VEHICLE_NODE_FAVOUR_DIRECTION
Like [`GET_CLOSEST_VEHICLE_NODE_WITH_HEADING`](#\_0xFF071FB798B803B0), but returns the nth closest node instead of the first.
0x45905BE8654AE067 - PATHFINDint
GET_NTH_CLOSEST_VEHICLE_NODE_ID
Description not yet documented
0x22D7275A79FE8215 - PATHFINDint
GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING
Description not yet documented
0x6448050E9C2A7207 - PATHFINDBOOL
GET_NTH_CLOSEST_VEHICLE_NODE_WITH_HEADING
Get the nth closest vehicle node with its heading and total lane count. If you need specific forward and backward lane counts use [`GET_CLOSEST_ROAD`](#\_0x132F52BBA570FE92).
0x80CA6A8B6C094CC4 - PATHFINDint
GET_NUM_NAVMESHES_EXISTING_IN_AREA
Description not yet documented
0x01708E8DD3FF8C65 - PATHFINDBOOL
_GET_POINT_ON_ROAD_SIDE
Description not yet documented
0x16F46FB18C8009E4 - PATHFINDBOOL
GET_POS_ALONG_GPS_TYPE_ROUTE
Native to get a position along current player GPS route using supplied slot. This native was previously named `GET_GPS_WAYPOINT_ROUTE_END`, but its named changed. ```cpp enum eGpsSlotType { GPS_SLOT_WAYPOINT = 0, GPS_SLOT_RADAR_BLIP = 1, GPS_SLOT_DISCRETE = 2 } ```
0xF3162836C28F9DA5 - PATHFINDBOOL
GET_RANDOM_VEHICLE_NODE
Description not yet documented
0x93E0DB8440B73A7D - PATHFINDBOOL
GET_ROAD_BOUNDARY_USING_HEADING
Description not yet documented
0xA0F8A7517A273C05 - PATHFINDBOOL
GET_SAFE_COORD_FOR_PED
```cpp enum eSafePositionFlags { // Only navmesh polygons marked as pavement GSC_FLAG_ONLY_PAVEMENT = 1, // Only navmesh polygons not marked as "isolated" GSC_FLAG_NOT_ISOLATED = 2, // No navmesh polygons created from interiors GSC_FLAG_NOT_INTERIOR = 4, // No navmesh polygons marked as water GSC_FLAG_NOT_WATER = 8, // Only navmesh polygons marked as "network spawn candidate" GSC_FLAG_ONLY_NETWORK_SPAWN = 16, // Specify whether to use a flood-fill from the starting position, as opposed to scanning all polygons within the search volume GSC_FLAG_USE_FLOOD_FILL = 32 } ```
0xB61C8E878A4199CA - PATHFINDvoid
GET_STREET_NAME_AT_COORD
``` Determines the name of the street which is the closest to the given coordinates. x,y,z - the coordinates of the street streetName - returns a hash to the name of the street the coords are on crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road Note: the names are returned as hashes, the strings can be returned using the function HUD::GET_STREET_NAME_FROM_HASH_KEY. ```
0x2EB41072B4C1E4C0 - PATHFINDBOOL
GET_VEHICLE_NODE_IS_GPS_ALLOWED
``` Returns false for nodes that aren't used for GPS routes. Example: Nodes in Fort Zancudo and LSIA are false ```
0xA2AE5C478B96E3B6 - PATHFINDBOOL
GET_VEHICLE_NODE_IS_SWITCHED_OFF
``` Returns true when the node is Offroad. Alleys, some dirt roads, and carparks return true. Normal roads where plenty of Peds spawn will return false ```
0x4F5070AA58F69279 - PATHFINDvoid
GET_VEHICLE_NODE_POSITION
``` Calling this with an invalid node id, will crash the game. Note that IS_VEHICLE_NODE_ID_VALID simply checks if nodeId is not zero. It does not actually ensure that the id is valid. Eg. IS_VEHICLE_NODE_ID_VALID(1) will return true, but will crash when calling GET_VEHICLE_NODE_POSITION(). ```
0x703123E5E7D429C2 - PATHFINDBOOL
GET_VEHICLE_NODE_PROPERTIES
Gets the density and flags of the closest node to the specified position.\ Density is a value between 0 and 15, indicating how busy the road is. ```cpp enum eVehicleNodeProperties { OFF_ROAD = 1 << 0, ON_PLAYERS_ROAD = 1 << 1, NO_BIG_VEHICLES = 1 << 2, SWITCHED_OFF = 1 << 3, TUNNEL_OR_INTERIOR = 1 << 4, LEADS_TO_DEAD_END = 1 << 5, HIGHWAY = 1 << 6, JUNCTION = 1 << 7, TRAFFIC_LIGHT = 1 << 8, GIVE_WAY = 1 << 9, WATER = 1 << 10, } ```
0x0568566ACBB5DEDC - PATHFINDBOOL
IS_NAVMESH_LOADED_IN_AREA
``` Returns whether navmesh for the region is loaded. The region is a rectangular prism defined by it's top left deepest corner to it's bottom right shallowest corner. If you can re-word this so it makes more sense, please do. I'm horrible with words sometimes... ```
0xF813C7E63F9062A5 - PATHFINDBOOL
_IS_NAVMESH_REQUIRED_REGION_OWNED_BY_ANY_THREAD
``` IS_* ```
0x705A844002B39DC0 - PATHFINDBOOL
IS_POINT_ON_ROAD
``` Gets a value indicating whether the specified position is on a road. The vehicle parameter is not implemented (ignored). ```
0x125BF4ABFC536B09
A living reference. Documentation coverage varies by native and source.