onPlayerExitingVehicle

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This is called when a player attempts to exit a vehicle.

Syntax

  1. 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.

  1.  
  2. function onPlayerExitingVehicle( player, vehicle )
  3. {
  4. MessagePlayer( "Oh noes! Seems the vehicle doors have malfunctioned", player );
  5. return 0;
  6. }
  7.  

Notes

The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox