taskLeaveVehicle
TASK_LEAVE_VEHICLE0xD3DBCE61A490BE02The GTA V native TASK_LEAVE_VEHICLE of the TASK namespace, as LS:MP client scripts call it: the global function taskLeaveVehicle, in JavaScript and in Lua.
taskLeaveVehicle(ped: Ped, vehicle: Vehicle, flags: number): voidtaskLeaveVehicle(ped: Ped, vehicle: Vehicle, flags: integer)Usage
JavaScript
taskLeaveVehicle(ped, vehicle, flags);Lua
taskLeaveVehicle(ped, vehicle, flags)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
vehicle | Vehicle | number | integer |
flags | 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.
Flags from decompiled scripts:
0 = normal exit and closes door.
1 = normal exit and closes door.
16 = teleports outside, door kept closed.
64 = normal exit and closes door, maybe a bit slower animation than 0.
256 = normal exit but does not close the door.
4160 = ped is throwing himself out, even when the vehicle is still.
262144 = ped moves to passenger seat first, then exits normally
Others to be tried out: 320, 512, 131072.
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_LEAVE_VEHICLE(Ped ped, Vehicle vehicle, int flags)- Hash
0xD3DBCE61A490BE02