[0.3x BUG?] TextDrawHideForPlayer
#1

My code:
pawn Код:
TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][0]);
            TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][1]);
            TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][2]);
            TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][3]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][0]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][1]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][2]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][3]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][4]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][5]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][6]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][7]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][8]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][9]);
            TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][10]);
Textdraws hides but 1 textdraw doesn't hide. The code is correct..

Sorry my bad english


EDIT: my code
pawn Код:
stock HideTextDrawDialog(playerid, dialogid)
{
    TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][0]);
    TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][1]);
    TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][2]);
    TextDrawHideForPlayer(playerid, Normal_Texts[dialogid][3]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][0]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][1]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][2]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][3]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][4]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][5]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][6]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][7]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][8]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][9]);
    TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][10]);
    CancelSelectTextDraw(playerid);
    return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(GetPVarInt(playerid, "menu_active") > 0)
    {
        //Esc
        if(clickedid == Text:INVALID_TEXT_DRAW)
        {
            CallLocalFunction("OnTextDrawDialogResponse", "dddd", playerid, 0, GetPVarInt(playerid, "menu_active"), -1);
            HideTextDrawDialog(playerid, GetPVarInt(playerid, "menu_active"));
            DeletePVar(playerid, "menu_active");
        }
Reply
#2

That's probably your script's bug. You probably forget to hide one of the textdraw you show.
Reply
#3

Why you just don't use a loop? I know it has nothing to do with your problem but could be more linable.
pawn Код:
for(new i = 0; i < 11; i++) TextDrawHideForPlayer(playerid, Lines_Texts[playerid][dialogid][i]);
Same can be used to show 'em.

Using same methods with my textdraws, dunno if it's the right done.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)