Countdown
#3

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
pawn Код:
//Global
new Text:draw1;
//OnGameModeInit
draw1 = TextDrawCreate(0,0,"default");
//Global
new Text:draw2;
//OnGameModeInit
draw2 = TextDrawCreate(0,0,"default");
//Global
new Mins = 3;
//config of textdraw [...]

forward Minute();
public Minute() {
    for(new i = 60; i > 0; i--;) {
        TextDrawHideForAll(draw1);
        new ts[10];
        valstr(ts,i);
        TextDrawHideForAll(draw1);
        TextDrawSetString(draw1,ts);
        TextDrawShowForAll(draw1);
    }
    return 1;
}
forward Decrease();
public Decrease() {
    Mins--;
    new ts[10];
    valstr(ts,Mins);
    format(ts,sizeof(ts),"%s:",ts);
    TextDrawHideForAll(draw2);
    if(Mins == 0) {
        TextDrawHideForAll(draw1);
        return MyFunc();
    }
    TextDrawSetString(draw2,ts);
    TextDrawShowForAll(draw2);
    return 1;
}
If it isn't working, then I think you can fix it. :)
How about making it 3:00 [mins:secs]

How would that go?
Reply


Messages In This Thread
Countdown - by Markx - 27.05.2011, 19:59
Re: Countdown - by Seven_of_Nine - 27.05.2011, 20:19
Re: Countdown - by Markx - 27.05.2011, 20:47
Re: Countdown - by Seven_of_Nine - 27.05.2011, 21:07
Re: Countdown - by BigETI - 27.05.2011, 21:27
Re: Countdown - by Markx - 28.05.2011, 08:44
Re: Countdown - by cs_master - 28.05.2011, 09:05
Re: Countdown - by BigETI - 28.05.2011, 10:28

Forum Jump:


Users browsing this thread: 5 Guest(s)