Squirrel/Server/Functions/Players/Colour
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Player.Colour}} This ''Player'' class member returns or sets the colour of the player. These colour IDs are the ones defined in your content.xml. == Syntax …') |
Latest revision as of 18:30, 1 October 2010
This Player class member returns or sets the colour of the player. These colour IDs are the ones defined in your content.xml.
[edit] Syntax
You can either return or set a new value using this member:
int Player.Colour
Player.Colour = int col
[edit] Arguments
- col - This is the new colour for the player. Check out content.xml for colour IDs
[edit] Example 1. Returning the value
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "col" ) { MessagePlayer( "Your player colour is " + pPlayer.Colour, pPlayer ); } return 1; }
[edit] Notes
The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.
[edit] Example 2. Setting a new value
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "col2" ) { pPlayer.Colour = 2; } return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.
[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