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…
Hash
0xE20A909D8C4A70F8Runtime name
DeleteVehicleNamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xEA386986E786A54FSignature
void DELETE_VEHICLE(Vehicle* vehicle);Parameters
| Name | Type | Description |
|---|---|---|
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
local vehicle = DeleteVehicle(vehicle)
-- always works, by hash
local vehicle = Citizen.InvokeNative(0xE20A909D8C4A70F8, Citizen.PointerValueIntInitialized(vehicle))JavaScript and C#
const vehicle = DeleteVehicle(vehicle);
// by hash
const vehicle = Citizen.invokeNative('0xE20A909D8C4A70F8', Citizen.pointerValueIntInitialized(vehicle));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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.