Przejdź do głównej zawartości

PlayerTextDrawBackgroundColour

warning

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

Description

Adjust the background colour of a player-textdraw.

NameDescription
playeridThe ID of the player whose player-textdraw to set the background colour of
PlayerText:textidThe ID of the player-textdraw to set the background colour of
backgroundColourThe colour that the textdraw should be set to.

Returns

This function does not return any specific values.

Examples

new PlayerText:gMyTextdraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gMyTextdraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my OPEN.MP server");
PlayerTextDrawUseBox(playerid, gMyTextdraw[playerid], true);
PlayerTextDrawBackgroundColour(playerid, gMyTextdraw[playerid], 0xFFFFFFFF); // Set the background colour of gMyTextdraw to white
return 1;
}

Notes

wskazówka
  • If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColour.
  • Changing the value of colour seems to alter the colour used in PlayerTextDrawColour.