taskVehicleTempAction
TASK_VEHICLE_TEMP_ACTION0xC429DCEEB339E129The GTA V native TASK_VEHICLE_TEMP_ACTION of the TASK namespace, as LS:MP client scripts call it: the global function taskVehicleTempAction, in JavaScript and in Lua.
taskVehicleTempAction(
driver: Ped,
vehicle: Vehicle,
action: number,
time: number
): voidtaskVehicleTempAction(
driver: Ped,
vehicle: Vehicle,
action: integer,
time: integer
)Usage
taskVehicleTempAction(driver, vehicle, action, time);taskVehicleTempAction(driver, vehicle, action, time)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
driver | Ped | number | integer |
vehicle | Vehicle | number | integer |
action | int | number | integer |
time | int | 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.
'1 - brake
'3 - brake + reverse
'4 - turn left 90 + braking
'5 - turn right 90 + braking
'6 - brake strong (handbrake?) until time ends
'7 - turn left + accelerate
'8 - turn right + accelerate
'9 - weak acceleration
'10 - turn left + restore wheel pos to center in the end
'11 - turn right + restore wheel pos to center in the end
'13 - turn left + go reverse
'14 - turn left + go reverse
'16 - crash the game after like 2 seconds :)
'17 - keep actual state, game crashed after few tries
'18 - game crash
'19 - strong brake + turn left/right
'20 - weak brake + turn left then turn right
'21 - weak brake + turn right then turn left
'22 - brake + reverse
'23 - accelerate fast
'24 - brake
'25 - brake turning left then when almost stopping it turns left more
'26 - brake turning right then when almost stopping it turns right more
'27 - brake until car stop or until time ends
'28 - brake + strong reverse acceleration
'30 - performs a burnout (brake until stop + brake and accelerate)
'31 - accelerate + handbrake
'32 - accelerate very strong
Seems to be this:
Works on NPCs, but overrides their current task. If inside a task sequence (and not being the last task), "time" will work, otherwise the task will be performed forever until tasked with something else
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_VEHICLE_TEMP_ACTION(Ped driver, Vehicle vehicle, int action, int time)- Hash
0xC429DCEEB339E129