DestroyVehicle
From SA-MP Wiki
Description:
Destroy a vehicle. It will disappear instantly.
(vehicleid)
vehicleid | The 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.
- CreateVehicle: Create a vehicle.
- RemovePlayerFromVehicle: Throw a player out of their vehicle.
- SetVehicleToRespawn: Respawn a vehicle.