Squirrel/Client/Functions/Players/Train
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Player.Train}} {{Squirrel/LUOnly}} {{ScriptingChangesIn0.1.0.11}} This ''Player'' class member returns the train the player is in or ''INVALID_TRAIN_ID'' if the …') |
Latest revision as of 23:23, 12 September 2011
This Player class member returns the train the player is in or INVALID_TRAIN_ID if the player is not travelling on a train.
[edit] Syntax
int Player.Train
[edit] Arguments
- none
[edit] Example
This example command tells player which train theyre riding when they type '/train'.
function onClientCommand( cmd, text ) { if ( cmd == "train" ) { Message( "Your current train is train ID: " + FindLocalPlayer().Train ); } return 1; }
[edit] Notes
The functions Message, FindLocalPlayer and call onClientCommand were used in this example. More info about them can be found in the corresponding pages.
[edit] Related Functions
- FindLocalPlayer
- FindPlayer
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.Colour
- Player.Frozen
- Player.Health
- Player.ID
- Player.Immune
- Player.Island
- Player.Marker
- Player.Name
- Player.Ping
- Player.Pos
- Player.RemoveLimb
- Player.Score
- Player.Skin
- Player.Spawn
- Player.Team
- Player.Train
- Player.Vehicle
- Player.Velocity
- Player.VirtualWorld
- Player.WantedLevel
- Player.Weapon
- Player.WeaponAmmo
- Player.WeaponState