TasksClient

taskOpenVehicleDoor

TASK_OPEN_VEHICLE_DOOR0x965791A9A488A062

The GTA V native TASK_OPEN_VEHICLE_DOOR of the TASK namespace, as LS:MP client scripts call it: the global function taskOpenVehicleDoor, in JavaScript and in Lua.

SignatureJavaScript
taskOpenVehicleDoor(
  ped: Ped,
  vehicle: Vehicle,
  timeOut: number,
  seat: number,
  speed: number
): void
SignatureLua
taskOpenVehicleDoor(
  ped: Ped,
  vehicle: Vehicle,
  timeOut: integer,
  seat: integer,
  speed: number
)

Usage

JavaScript
taskOpenVehicleDoor(ped, vehicle, timeOut, seat, speed);
Lua
taskOpenVehicleDoor(ped, vehicle, timeOut, seat, speed)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
vehicleVehiclenumberinteger
timeOutintnumberinteger
seatintnumberinteger
speedfloatnumbernumber

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.

The given ped will try to open the nearest door to 'seat'.
Example: telling the ped to open the door for the driver seat does not necessarily mean it will open the driver door, it may choose to open the passenger door instead if that one is closer.

Reference

Namespace
Tasks TASK
In the game
void TASK_OPEN_VEHICLE_DOOR(Ped ped, Vehicle vehicle, int timeOut, int seat, float speed)
Hash
0x965791A9A488A062

Open in the interactive natives reference