Squirrel/Server/Functions/Players/VirtualWorld
From Liberty Unleashed Wiki
(Difference between revisions)
(→Arguments) |
(→Arguments) |
||
Line 10: | Line 10: | ||
* '''value''' - An ID of the virtual world that the player is in. | * '''value''' - An ID of the virtual world that the player is in. | ||
− | You Can Make The value = False To Log Out The virtual world Like This > | + | You Can Make The value = False To Log Out The virtual world Like This > <code>player.VirtualWorld = false;</code> |
== Example 1. Returning == | == Example 1. Returning == |
Latest revision as of 09:01, 11 August 2013
This function sets/returns the players Virtual World.
[edit] Syntax
int player.VirtualWorld
player.VirtualWorld = int value
[edit] Arguments
- value - An ID of the virtual world that the player is in.
player.VirtualWorld = false;
[edit] Example 1. Returning
This will tell the player what virtual world they are in when they type '/vworld'.
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "vworld" ) { MessagePlayer( "Your current virtual world is - " + pPlayer.VirtualWorld, pPlayer ); } return 1; }
[edit] Example 2. Setting
This will set the player's virtual world to world 1 when they type '/vworld2'.
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "vworld2" ) { pPlayer.VirtualWorld = 1; } return 1; }
[edit] Notes
The function MessagePlayer and event onPlayerCommand were used in these examples. More info about them in the 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