DestroyVehicle

From SA-MP Wiki

Jump to: navigation, search


Description:

Destroy a vehicle. It will disappear instantly.


Parameters:
(vehicleid)
vehicleidThe ID of the vehicle to destroy.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The vehicle does not exist.


Example Usage:

public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/destroyveh", true) == 0)
     {
          new vehicleid = GetPlayerVehicleID(playerid);
          DestroyVehicle(vehicleid);
          return 1;
     }
 
     return 0;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages