Native referenceRedM

ADD_NAVMESH_BLOCKING_OBJECT

0xFCD5C8E06E502F5A PATHFIND
FUNCTION SIGNATURE
Any ADD_NAVMESH_BLOCKING_OBJECT(float x, float y, float z, float width, float length, float height, float heading, BOOL bPermanent, int flags);
Property Value
Native Name ADD_NAVMESH_BLOCKING_OBJECT
Hash 0xFCD5C8E06E502F5A
Return Type Any
Build 1207
Parameters x (float), y (float), z (float), width (float), length (float), height (float), heading (float), bPermanent (BOOL), flags (int)

Description: 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 and onResourceStop

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,
}

Parameters

  • x (float) — The x coordinate to create the block on.
  • y (float) — The y coordinate.
  • z (float) — The z coordinate.
  • width (float) — The width of the block.
  • length (float) — The length of the block.
  • height (float) — The height of the block.
  • heading (float) — The heading of object in degrees.
  • bPermanent (BOOL) — A boolean indicating if the blocking object is permanent (true/false).
  • flags (int) — Flag for the blocking object, refer to eBlockingObjectFlags.

Usage

Lua (Direct):

local result = AddNavmeshBlockingObject(x, y, z, width, length, height, heading, bPermanent, flags)

Lua (Hash):

local result = Citizen.InvokeNative(0xFCD5C8E06E502F5A, x, y, z, width, length, height, heading, bPermanent, flags)
Back to PATHFIND