Difference between revisions of "TPlayer.SkinColor"

From Soldat Community Wiki
Jump to: navigation, search
(new page)
 
m
Line 1: Line 1:
  '''''property PantsColor: Longword'''''
+
  '''''property SkinColor: Longword'''''
 
   Access mode: R
 
   Access mode: R
 
==Description==
 
==Description==

Revision as of 14:40, 29 July 2013

property SkinColor: Longword
 Access mode: R

Description

3-bytes hexadecimal code representing the skin color of a player/bot. It's BGR, not RGB.

Example

  var
    MyBot: TNewPlayer;
  begin
    MyBot := TNewPlayer.Create;
    try
      MyBot.Name := 'Cool test bot!';
      MyBot.Team := 1;
      MyBot.Headgear := 0; //nothing on the head so we can see the hair
      MyBot.Hairstyle := 1; //cool dreadlocks
      MyBot.Haircolor := $0000FF;
      MyBot.ShirtColor := $0000FF; //red shirt!
      MyBot.PantsColor := $FFFFFFFF;
      MyBot.SkinColor := $FFFFFFFF;
      Players.Add(MyBot);
    finally
      MyBot.Free;
    end;
  end;