Deletes a entity for complete.
- entity: parameter input should be in NetHandle type.
The command below destroys a vehicle of a player using the DeleteEntity function.
public void DestroyVehicle(Client playerid)
// Check if player is in any vehicle.
API.sendChatMessageToPlayer(playerid, "You are not in a vehicle.");
return; // Command will stop right here, will not continue, because the player isn't in a vehicle.
// Continue if player is in a vehicle.
API.sendChatMessageToPlayer(playerid, "You destroyed your vehicle!");