Skip to main content

Player::setHeadOverlay

OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0.

First and second color you can take in the list of hair colors.

List of colors: <https://wiki.rage.mp/wiki/Makeup_Colors>

OverlayIDPartIndex
0Blemishes0-23
1Facial Hair0-28
2Eyebrows0-33
3Ageing0-14
4Makeup0-74
5Blush0-32
6Complexion0-11
7Sun Damage0-10
8Lipstick0-9
9Moles/Freckles0-17
10Chest Hair0-16
11Body Blemishes0-11
12Add Body Blemishes0-1

<b>To disable any overlay use 255 as index.</b>

Syntax

Required Arguments

  • overlayID: int
  • index: int
  • opacity: float
  • firstColor: int
  • secondColor: int

Return value

  • Undefined

Example

```csharp C# Serverside Example

private static readonly string[] headOverlayNames = \&#123; "blemishes", "facialHair", "eyebrows", "ageing", "makeup", "blush", "complexion", "sunDamage", "lipstick", "molesFreckles", "chestHair", "bodyBlemishes", "addBodyBlemishes" \&#125;;

private static HeadOverlay CreateHeadOverlay(Byte index, Byte color, Byte secondaryColor, float opacity) &#123;

   return new HeadOverlay
   \&#123;
      Index = index,
      Color = color,
      SecondaryColor = secondaryColor,
      Opacity = opacity
   \&#125;;

&#125;

[Command("beard")] public void Beard(Client c, byte Index, byte Color, byte SeconardyColor, byte Opacity) &#123;

   Dictionary&lt;int, HeadOverlay&gt; headOverlays = new Dictionary&lt;int, HeadOverlay&gt;();
   headOverlays.Add(1, CreateHeadOverlay((byte)Index, (byte)Color, (byte)SeconardyColor, (byte)Opacity));
   c.SetHeadOverlay(1, headOverlays[1]);

&#125;

Testexamples use Command: beard 1 0 0 1 = Set beard 1 with PrimaryColor 0 SecondardyColor 0 and opacity 1 (use opacity 0 for invisible, 1 for full visible) beard 2 22 0 1 = Set beard 1 with PrimaryColor 22(red) SecondardyColor 0 and opacity 1 (use opacity 0 for invisible, 1 for full visible) Restriction: Command can just handle 0, 1 on opacity but it is a byte and can have a value from 0.0 - 1.0 ```

See also