Squirrel/Server/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 …') |
m (Redirect issue fix) |
||
Line 34: | Line 34: | ||
== Related Functions == | == Related Functions == | ||
− | {{Squirrel/Functions/Players}} | + | {{Squirrel/Server/Functions/Players}} |
Latest revision as of 18:27, 15 January 2012
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 onPlayerCommand( player, cmd, text ) { if ( cmd == "train" ) { MessagePlayer( "Your current train is train ID: " + player.Train, player ); } return 1; }
[edit] Notes
The function MessagePlayer and call onPlayerCommand were used in this example. More info about them can be found in corresponding pages.
[edit] Related Functions
- FindPlayer
- GetClosestPlayer
- Player.Alpha
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.ClearWeapons
- Player.Colour
- Player.ColouredName
- Player.EnterVehicle
- Player.ExitVehicle
- Player.ForceToSpawnScreen
- Player.Frozen
- Player.GetBoundariesLower
- Player.GetBoundariesUpper
- Player.GetIgnored
- Player.Health
- Player.ID
- Player.IP
- Player.Immune
- Player.Island
- Player.LUID
- Player.Marker
- Player.MarkerScale
- Player.MarkerSprite
- Player.Muted
- Player.Name
- Player.Nametag
- Player.NametagColour
- Player.Ping
- Player.Pos
- Player.RemoveFromVehicle
- Player.RemoveLimb
- Player.Score
- Player.SetAnim
- Player.SetBoundaries
- Player.SetIgnored
- Player.SetIgnoredBy
- Player.SetVehicleEnterDoor
- Player.SetWeapon
- Player.Skin
- Player.Spawn
- Player.Spawned
- Player.Team
- Player.Train
- Player.Vehicle
- Player.VehicleSeat
- Player.Velocity
- Player.VirtualWorld
- Player.WantedLevel
- Player.Weapon
- Player.SetWeapon
- Player.WeaponAmmo
- Player.WeaponState