Textdraw Hiding with Timer
#1

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
Reply
#2

Use SetTimer...
Then TextDrawHideForAll.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)