TextDraw Timers
#3

Here you go
pawn Код:
forward TextDrawTimer();

new txdtimer;
new time;

txdtimer = SetTimer("TextDrawTimer",1000,1);

public TextDrawTimer()
{
    new string[32];
    new hour,minute,second;
    if(time >= 3600) { hour = time/3600; time = time-(hour*3600); } else { hour = 0; }
    if(time >= 60) { minute = time/60; time = time-(minute*60); } else { minute = 0; }
    if(time < 60) { second = time; }  else { second = 0; }
    format(string,sizeof(string),"%02d:%02d:%02d",hour,minute,second);
    TextDrawSetString(YourTEXTDRAW,string);
    time++;
}
also you need somewhere
pawn Код:
KillTimer(txdtimer);
time = 0;
with this you can count hours minutes seconds
Reply


Messages In This Thread
TextDraw Timers - by Code_Red - 29.07.2010, 07:16
Re: TextDraw Timers - by iJumbo - 29.07.2010, 07:59
Re: TextDraw Timers - by ikey07 - 29.07.2010, 08:26

Forum Jump:


Users browsing this thread: 1 Guest(s)