TaskVehicleTempAction
DocsTaskVehicleTempAction(driver, vehicle, action, time)Description
Gives the vehicle a temporary action.
Note: For migrating objects, a CScriptEntityStateChangeEvent will be sent over the network to let other clients know that this object is being given a temporary action. At the same time, temporary actions cannot be applied to clones/remote objects.
enum eTempAction {
TA_NONE = 0,
TA_WAIT = 1,
TA_UNUSED = 2,
TA_BRAKE_REVERSE = 3,
TA_HANDBRAKE_TURN_LEFT = 4,
TA_HANDBRAKE_TURN_RIGHT = 5,
TA_HANDBRAKE_UNTIL_TIME_ENDS = 6,
TA_TURN_LEFT = 7,
TA_TURN_RIGHT = 8,
TA_ACCELERATE = 9,
TA_TURN_LEFT = 10,
TA_TURN_RIGHT = 11,
TA_UNUSED_12 = 12,
TA_TURN_LEFT_GO_REVERSE = 13,
TA_TURN_RIGHT_GO_REVERSE = 14,
TA_PLANE_FLY_UP = 15, // (crashes game if not in plane)
TA_PLANE_FLY_STRAIGHT = 16, // (crashes game if not in plane)
TA_PLANE_SHARP_LEFT = 17, // (crashes game if not in plane)
TA_PLANE_SHARP_RIGHT = 18, // (crashes game if not in plane)
TA_STRONG_BRAKE = 19,
TA_TURN_LEFT_AND_STOP = 20,
TA_TURN_RIGHT_AND_STOP = 21,
TA_GO_IN_REVERSE = 22,
TA_ACCELERATE_FAST = 23,
TA_BRAKE_ACTION = 24,
TA_HANDBRAKE_TURN_LEFT_MORE = 25,
TA_HANDBRAKE_TURN_RIGHT_MORE = 26,
TA_HANDBRAKE_BRAKE_STRAIGHT = 27,
TA_BRAKE_STRONG_REVERSE_ACCELERATION = 28,
TA_UNUSED_29 = 29,
TA_PERFORMS_BURNOUT = 30,
TA_REV_ENGINE = 31,
TA_ACCELERATE_VERY_STRONG = 32,
TA_SURFACE_IN_SUBMARINE = 33
};Parameters
| Name | Type | Description |
|---|---|---|
driver | Ped | The vehicle driver (`Ped`). |
vehicle | Vehicle | The vehicle handle. |
action | int | The temporary action, see `eTempAction`. |
time | int | The time to run this temp action for, use `-1` for infinite. Time is in milliseconds. |
Quick Snippet: Get Ped Handledriver
driverUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaPed Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.