DestroyVehicle
From SA-MP Wiki
DestroyVehicle
Destroys a vehicle which was previously created.
(vehicleid)
| vehicleid | The vehicleid of the vehicle which shall be destroyed. |
This function does not return a specific value.
public OnPlayerCommandText(playerid, cmdtext[]) { //First the script gets the vehicle id of the current car and then destroys it when typing /destroyveh if(strcmp(cmdtext, "/destroyveh", true) == 0) { new currentveh; currentveh = GetPlayerVehicleID(playerid); DestroyVehicle(currentveh); return 1; } return 0; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- CreateVehicle: Create a vehicle.
- RemovePlayerFromVehicle: Throw a player out of their vehicle.
