RedM Natives

DELETE_VEHICLE

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…

Hash0xE20A909D8C4A70F8
Runtime nameDeleteVehicle
NamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xEA386986E786A54F

Signature

void DELETE_VEHICLE(Vehicle* vehicle);

Parameters

NameTypeDescription
vehicleVehicle*—

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
local vehicle = DeleteVehicle(vehicle)

-- always works, by hash
local vehicle = Citizen.InvokeNative(0xE20A909D8C4A70F8, Citizen.PointerValueIntInitialized(vehicle))
JavaScript and C#
JavaScript
const vehicle = DeleteVehicle(vehicle);

// by hash
const vehicle = Citizen.invokeNative('0xE20A909D8C4A70F8', Citizen.pointerValueIntInitialized(vehicle));
C#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.