OnPlayerStartEnterVehicle
From Onset Developer Wiki
Description
Called when a player presses the key to start entering a vehicle. You can return false in this event to stop the player from entering.
Syntax
OnPlayerStartEnterVehicle(vehicle, seat)
- vehicle
The vehicle identifier. - seat
The vehicle seat in which the player tries to get in.
Example
AddEvent("OnPlayerStartEnterVehicle", function(vehicleId, seatId)
if seatId == 0 then
print("Entered as a driver.")
end
end)