Przejdź do głównej zawartości

PlayerTextDrawColour

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Sets the text colour of a player-textdraw

NameDescription
playeridThe ID of the player who's textdraw to set the colour of
PlayerText:textidThe TextDraw to change.
textColourThe colour in hexadecimal format.

Returns

This function does not return any specific values.

Examples

new PlayerText:pTextdraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
pTextdraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Example Text");
PlayerTextDrawColour(playerid, pTextdraw[playerid], 0xFF0000FF); // Red text

PlayerTextDrawShow(playerid, pTextdraw[playerid]);
return 1;
}

Notes

wskazówka
  • You can also use Gametext colours in textdraws. (e.g. ~r~ ~g~ ~b~)
  • The textdraw must be re-shown to the player in order to update the colour.