help with count down secounts
#5

This will work (the one before isn't good for you )

Here (No extra Variables required):
pawn Код:
forward CountdownTextDraw(playerid, Text:textid, secondstocount);
public CountdownTextDraw(playerid, Text:textid, secondstocount)
{
    if(secondstocount == 0) { TextDrawHideForPlayer(playerid, textid); }
    else {
        new timestring[32];
        format(timestring, sizeof(timestring), "%i seconds remaining..", secondstocount);
        TextDrawSetString(textid, timestring);
        TextDrawShowForPlayer(playerid, textid);
        secondstocount--;
        SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, textid, secondstocount);
    }
    return true;
}
Example usage:
pawn Код:
new Text:JailTextDraw;

    JailTextDraw = TextDrawCreate(327.000000, 377.000000, "X");
    TextDrawAlignment(JailTextDraw, 2);
    TextDrawBackgroundColor(JailTextDraw, 255);
    TextDrawFont(JailTextDraw, 2);
    TextDrawLetterSize(JailTextDraw, 0.620000, 3.200000);
    TextDrawColor(JailTextDraw, -1);
    TextDrawSetOutline(JailTextDraw, 0);
    TextDrawSetProportional(JailTextDraw, 1);
    TextDrawSetShadow(JailTextDraw, 1);

CountdownTextDraw(playerid, JailTextDraw, 120);
Reply


Messages In This Thread
help with count down secounts - by Rafa - 27.07.2011, 17:14
Re: help with count down secounts - by Riddick94 - 27.07.2011, 17:23
Re: help with count down secounts - by iPLEOMAX - 27.07.2011, 17:26
Re: help with count down secounts - by Rafa - 27.07.2011, 17:36
Re: help with count down secounts - by iPLEOMAX - 27.07.2011, 17:43
Re: help with count down secounts - by Rafa - 27.07.2011, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)