SA-MP Forums Archive
Textdraw Hiding with Timer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Textdraw Hiding with Timer (/showthread.php?tid=71832)



Textdraw Hiding with Timer - Robbin237 - 04.04.2009

Hi guys, a very long time i made a textdraw script for announce. The thing is, i want it to automatically hide for everybody after 4 seconds (with TextDrawHideForAll(TextDraw0)), and while it is still showing, not make the admin able to type another message before the 4 seconds are over.

I dont really know how Can somebody help me?

This is my code

pawn Код:
dcmd_actext(playerid, params[])
{
    if(_LOGIN_Rank[playerid] > 1) {
        if (!strlen(params))
        {
            SendClientMessage(playerid, 0xAA0000FF, "Usage: /text [Text]");
            return 1;
        }

        TextDrawDestroy(Textdraw0);
        Textdraw0 = TextDrawCreate(308.000000,200.000000, params); // 208.000000
        TextDrawAlignment(Textdraw0,2);
        TextDrawBackgroundColor(Textdraw0,0x000000ff);
        TextDrawFont(Textdraw0,3);
        TextDrawLetterSize(Textdraw0,1.100000,1.899999); // 2.599999
        TextDrawSetOutline(Textdraw0,1);
        TextDrawSetProportional(Textdraw0,1);
        TextDrawSetShadow(Textdraw0,10);
        TextDrawShowForAll(Textdraw0);
    }
    return 1;
}
Thnx


Re: Textdraw Hiding with Timer - SpiderPork - 04.04.2009

Use SetTimer...
Then TextDrawHideForAll.