deleteVehicle
DELETE_VEHICLE0xEA386986E786A54FThe GTA V native DELETE_VEHICLE of the VEHICLE namespace, as LS:MP client scripts call it: the global function deleteVehicle, in JavaScript and in Lua.
deleteVehicle(vehicle: Vehicle): voiddeleteVehicle(vehicle: Vehicle)⚠
Known issue
The value of vehicle does not reach the game yet: LS:MP currently treats this pointer as an output, so the game receives an empty value instead of yours.
Usage
JavaScript
deleteVehicle(vehicle);Lua
deleteVehicle(vehicle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Deletes a vehicle.
The vehicle must be a mission entity to delete, so call this before deleting: setEntityAsMissionEntity(vehicle, true, true);
eg how to use:
setEntityAsMissionEntity(vehicle, true, true);
deleteVehicle(&vehicle);Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void DELETE_VEHICLE(Vehicle* vehicle)- Hash
0xEA386986E786A54F