Ugrás a fő tartalomhoz

PlayerTextDrawIsBox

vigyázat

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

Description

Checks if a player-textdraw is box.

Parameters

NameDescription
playeridThe ID of the player.
Text:textidThe ID of the player-textdraw to check.

Return Values

Returns true if the player-textdraw is box, otherwise false.

Example Usage

new PlayerText:welcomeText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 40.0, 140.0, "_~N~Welcome!~N~_");
PlayerTextDrawUseBox(playerid, welcomeText[playerid], true); // Toggle box ON
PlayerTextDrawBoxColor(playerid, welcomeText[playerid], 0x00000066); // Set the box color to a semi-transparent black
PlayerTextDrawShow(playerid, welcomeText[playerid]);

if (PlayerTextDrawIsBox(playerid, welcomeText[playerid]))
{
// Player-Textdraw is box
}
else
{
// Player-Textdraw is not box
}
return 1;
}