onPlayerExitingVehicle
From Liberty Unleashed Wiki
This is called when a player attempts to exit a vehicle.
Syntax
function onPlayerExitingVehicle( Player player, Vehicle vehicle )
Arguments
- player - The player who is trying to exit the vehicle
- vehicle - The vehicle the player is exiting
Returns
- 1 - Allows the player to exit the vehicle normally
- 0 - Locks the player in
Example
This example will stop the player from exiting the vehicle.
function onPlayerExitingVehicle( player, vehicle ) { MessagePlayer( "Oh noes! Seems the vehicle doors have malfunctioned", player ); return 0; }
Notes
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.