Skip to content

A3D_DestroyRoute

imshooter edited this page Oct 23, 2026 · 1 revision

Destroy a route, and hide it from the players it is shown to.

native bool:A3D_DestroyRoute(Route:routeid);

Parameters

Parameter Description
Route:routeid Route to destroy.

Returns

  • true when the route was destroyed.
  • false when the route does not exist.

Remarks

The players the route is shown to stop seeing it, and its id may go to the next route found. A script that keeps the ids of its routes should set them back to INVALID_ROUTE_ID when it destroys them. The routes of a script are destroyed when it unloads.

Example

Forgets the route of a player who leaves.

static Route:gDelivery[MAX_PLAYERS] = { INVALID_ROUTE_ID, ... };

public OnPlayerDisconnect(playerid, reason) {
    A3D_DestroyRoute(gDelivery[playerid]);
    gDelivery[playerid] = INVALID_ROUTE_ID;

    return 1;
}

Related

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally