DestroyVehicle

DestroyVehicle

Description:
Function DestroyVehicle destroy a vehicle. It will disappear instantly.


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


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


Examples:
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.