clearPrimaryVehicleTask
CLEAR_PRIMARY_VEHICLE_TASK0xDBBC7A2432524127The GTA V native CLEAR_PRIMARY_VEHICLE_TASK of the TASK namespace, as LS:MP client scripts call it: the global function clearPrimaryVehicleTask, in JavaScript and in Lua.
clearPrimaryVehicleTask(vehicle: Vehicle): voidclearPrimaryVehicleTask(vehicle: Vehicle)Usage
JavaScript
clearPrimaryVehicleTask(vehicle);Lua
clearPrimaryVehicleTask(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.
This native is very useful when switching the player to a ped inside a vehicle that has a task assigned prior to the player switch.
It is necessary to clear the ped's tasks AND call this native with the vehicle the player is switching into in order to allow the player to control the vehicle after the player switches.
Reference
- Namespace
- Tasks TASK
- In the game
void CLEAR_PRIMARY_VEHICLE_TASK(Vehicle vehicle)- Hash
0xDBBC7A2432524127- Introduced
- Game build 1290 legacy numbering
- Formerly
_CLEAR_VEHICLE_TASKS