پرش به مطلب اصلی

PlayerTextDrawColor

Description

Sets the text color of a player-textdraw

NameDescription
playeridThe ID of the player who's textdraw to set the color of
PlayerText:textidThe TextDraw to change.
textColourThe color 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");
PlayerTextDrawColor(playerid, pTextdraw[playerid], 0xFF0000FF); // Red text

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

Notes

نکته
  • 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 color.