Squirrel/Server/Functions/Players/SetVehicleEnterDoor

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (fail link)
m
 
Line 10: Line 10:
  
 
* '''door''' - This is the ID of the door to use to override. For a list of doors, check [[Squirrel/Server/Constants#Vehicle_Doors|here]]
 
* '''door''' - This is the ID of the door to use to override. For a list of doors, check [[Squirrel/Server/Constants#Vehicle_Doors|here]]
 
  
 
== Example ==
 
== Example ==

Latest revision as of 23:30, 28 May 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events


This function overrides the players target door when they start entering a vehicle.

[edit] Syntax

  1. bool Player.SetVehicleEnterDoor( int door )

[edit] Arguments

  • door - This is the ID of the door to use to override. For a list of doors, check here

[edit] Example

This example will force the player enter a vehicle as a driver.

  1.  
  2. function onPlayerEnteringVehicle( player, vehicle, door )
  3. {
  4. player.SetVehicleEnterDoor( DOOR_DRIVER );
  5. return 1;
  6. }
  7.  
  8.  

[edit] Notes

The call onPlayerEnteringVehicle was used in in this example. More info about it in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox