Player.Pos
From Liberty Unleashed Wiki
This Player class member returns or sets the position of the given player.
Syntax
You can either return or set a new value using this member:
Vector player.Pos
player.Pos = Vector vPos
Arguments
- vPos - This is the new position for the player as a Vector
Example 1. Returning
function onPlayerCommand( player, cmd, text ) { if ( cmd == "mypos" ) { MessagePlayer( "Your current position is: " + player.Pos, player ); } }
This command will tell the player their current co-ordinates.
Example 2. Setting
function onPlayerCommand( player, cmd, text ) { if ( cmd == "setmypos" ) { local newpos = Vector( 100.00, 90.00, 1.00 ); player.Pos = newpos; } }
This command will set the players position to the co-ordinates of 100.00 (X), 90.00 (Y), 1.00 (Z).
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
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