onPlayerEnteringVehicle
From Liberty Unleashed Wiki
This is called when a player begins entering a vehicle.
Syntax
function onPlayerEnteringVehicle( Player player, Vehicle vehicle, int door )
Arguments
- 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
Returns
- 1 - Allows the player to enter the vehicle normally
- 0 - Stops the player from entering the vehicle
Example
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; }
Notes
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.