Textdraw
#1

How to Hide all text draws in one line for one player?
Reply
#2

TextDrawHideForPlayer
Reply
#3

You can't.
At least you can do this, a function:
pawn Код:
HideAllTextDraws(playerid)
{
    HideTextDrawForPlayer(playerid, TextDraw1);
    HideTextDrawForPlayer(playerid, TextDraw2);
    HideTextDrawForPlayer(playerid, TextDraw3);
}
And use it as this:
pawn Код:
public OnPlayerDeath(playerid) //Example callback
{
    HideAllTextDraws(playerid);
    return 1;
}
Another way is making an array:
pawn Код:
new Text:TDName[3];

public OnGameModeInit()
{
    TDName[0] = TextDrawCreate(.............);
    //etc.

    TDName[1] = TextDrawCreate(.............);
    //etc.

    TDName[2] = TextDrawCreate(.............);
    //etc.
    return 1;
}

//Example:
public OnPlayerDeath(playerid)
{
    HideAllTD(playerid);
    return 1;
}

//Function:
HideAllTD(playerid)
{
    for(new d = 0; d <= 3; d++)
    {
        TextDrawHideForPlayer(playerid, TDName[d]);
    }
}
Also, you can make a constant (define) to hide them.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)