From Liberty Unleashed Wiki
This is called when a player begins entering a vehicle.
- function onPlayerEnteringVehicle( Player player, Vehicle vehicle, int door )
- player - The player who is entering a vehicle
- vehicle - The vehicle the player is entering
- door - The door which the player is using to enter the vehicle
- 1 - Allows the player to enter the vehicle normally
- 0 - Stops the player from entering the vehicle
This example will stop the player from entering the vehicle.
- function onPlayerEnteringVehicle( player, vehicle, door )
- MessagePlayer( "Bet you would like to enter that vehicle!", player );
- return 0;
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.