This is called when a player has successfully entered a vehicle.
- function onPlayerEnteredVehicle( Player player, Vehicle vehicle, int seat )
- player - The player entered a vehicle
- vehicle - The vehicle the player entered
- seat - The vehicle seat player is currently occupying
- 0 - Driver
- 1 - Front passenger
- 2 - Back left passenger
- 3 - Back right passenger
- 4- - Other passenger seats (coach, bus)
This event does not handle return values.
This example will message player the name of the vehicle they just entered.
- function onPlayerEnteredVehicle( player, vehicle, seat )
- MessagePlayer( "You entered a " + vehicle.tostring(), player );
- return 1;
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.