Ugrás a fő tartalomhoz

PlayerTextDrawBackgroundColor

Description

Adjust the background color of a player-textdraw.

NameDescription
playeridThe ID of the player whose player-textdraw to set the background color of
PlayerText:textidThe ID of the player-textdraw to set the background color of
backgroundColourThe color 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);
PlayerTextDrawBackgroundColor(playerid, gMyTextdraw[playerid], 0xFFFFFFFF); // Set the background colour of gMyTextdraw to white
return 1;
}

Notes

tanács
  • 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.