# VEHICLE::DELETE_VEHICLE

- **Hash:** `0xE20A909D8C4A70F8`
- **Namespace:** VEHICLE
- **Runtime name (Lua/JS):** `DeleteVehicle`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/VEHICLE/DELETE_VEHICLE

## Signature

```c
void DELETE_VEHICLE(Vehicle* vehicle);
```

## Parameters

- `vehicle` (`Vehicle*`)

## Returns

`void`

## Description

Deletes a vehicle.
The vehicle must be a mission entity to delete, so call this before deleting: SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true);

eg how to use:
SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true);
DELETE_VEHICLE(&vehicle);

Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL.

## Usage

### Lua

```lua
local vehicle = DeleteVehicle(vehicle)

-- always available, by hash
local vehicle = Citizen.InvokeNative(0xE20A909D8C4A70F8, Citizen.PointerValueIntInitialized(vehicle))
```

### JavaScript

```js
const vehicle = DeleteVehicle(vehicle);

// by hash
const vehicle = Citizen.invokeNative('0xE20A909D8C4A70F8', Citizen.pointerValueIntInitialized(vehicle));
```

### C#

```csharp
var vehicle = new OutputArgument();
Function.Call((Hash)0xE20A909D8C4A70F8, vehicle);
// vehicle.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.

*Sources: alloc8or RDR3 NativeDB.*
