---
title: "DestroyVehicle | open.mp"
description: "Уништава возило."
canonical: https://omp.itsneufox.com/sr/docs/scripting/functions/DestroyVehicle
language: sr
---

# DestroyVehicle

## Опис

Уништава возило. Возило одмах нестаје.

| Name | Description |
| --- | --- |
| vehicleid | ID возила које се уништава. |

## Враћа

**true** - Функција је успешно извршена.

**false** - Функција није успешно извршена. Возило не постоји.

## Примери

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

     return 0;
}
```

## Повезане функције

-   [CreateVehicle](https://omp.itsneufox.com/sr/docs/scripting/functions/CreateVehicle): Креира возило.
-   [RemovePlayerFromVehicle](https://omp.itsneufox.com/sr/docs/scripting/functions/RemovePlayerFromVehicle): Избаци играча из возила.
-   [SetVehicleToRespawn](https://omp.itsneufox.com/sr/docs/scripting/functions/SetVehicleToRespawn): Respawnuje возило.
