onVehicleStartExit
ServerEventCancellable
Fired on the server when a ped starts getting out of a vehicle or is about to be pulled out. Cancelling the event stops it.
addEventHandler("onVehicleStartExit", root, function(ped ped, int seat, ped|false jacker, int door) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| ped | ped | The ped or player getting out. |
| seat | int | The seat: 0 is the driver's, 1 onwards the passengers'. |
| jacker | ped|false | Who is pulling the ped out, or false. |
| door | int | The door used: 0 the driver's, 1 the front passenger's, 2 the rear one on the driver's side, 3 the rear one on the passenger's side, 4 a bike's from the front. Not given when the ped is pulled out. |
Source
The vehicle.
When the ped is being pulled out, cancelling stops the jack.
Example
addEventHandler("onVehicleStartExit", root, function(ped, seat)
if getElementData(ped, "algemado") then
cancelEvent()
end
end)