Squirrel/Server/Events/Vehicle/onPlayerExitingVehicle
From Liberty Unleashed Wiki
(Difference between revisions)
m |
|||
Line 4: | Line 4: | ||
== Syntax == | == Syntax == | ||
− | <code>function onPlayerExitingVehicle( | + | <code>function onPlayerExitingVehicle( Player player, Vehicle vehicle )</code> |
=== Arguments === | === Arguments === |
Latest revision as of 13:05, 11 November 2010
This is called when a player attempts to exit a vehicle.
[edit] Syntax
function onPlayerExitingVehicle( Player player, Vehicle vehicle )
[edit] Arguments
- player - The player who is trying to exit the vehicle
- vehicle - The vehicle the player is exiting
[edit] Returns
- 1 - Allows the player to exit the vehicle normally
- 0 - Locks the player in
[edit] 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; }
[edit] Notes
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.