GetPlayerColor Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

Return the table with nickname colors.

Syntax

table[r, g, b] getPlayerColor(int id);

Required Arguments

  • id: id of the player, who's color you want to get.

Returns

  • r: r color in rgb system.
  • g: g color in rgb system.
  • b: b color in rgb system.

Example

local function higherColor(id1)
{
    local pColor = getPlayerColor(id);
    setPlayerColor(id1, pColor.r + 10, pColor.g + 10, pColor.b + 10);
}

Related functions

Server

Shared