onVehicleStartEnter
ServerEventCancellable
Fired on the server when a ped starts getting into a vehicle. Cancelling the event stops it.
addEventHandler("onVehicleStartEnter", root, function(ped ped, int seat, ped|false jacked, int door) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| ped | ped | The ped or player getting in. |
| seat | int | The seat: 0 is the driver's, 1 onwards the passengers'. |
| jacked | ped|false | The driver about to be pulled 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. |
Source
The vehicle.
When the ped is jacking the car, onVehicleStartExit fires right after for the driver, and cancelling either of them stops the jack.
Example
addEventHandler("onVehicleStartEnter", root, function(ped, seat, jacked)
if jacked then
cancelEvent()
end
end)