A little problem with the timer
#1

hey guys

i have a little problem with the timer:
Quote:

new counter[256];
public timer(playerid){
format(counter,sizeof(counter),"%d:%d",minutes[playerid],seconds[playerid]);
GameTextForPlayer(GetFullNameID(TheInviter[playerid]), counter,1000,1);
GameTextForPlayer(playerid,counter,1000,1);
seconds[playerid]++;
if(seconds[playerid]==60){
seconds[playerid]=0;
minutes[playerid]++;
}
SetTimerEx("timer", 1000, false, "d", playerid);
return 1;
}

well, this callback works fine, he counts, but the gamemodtext not fast enough and this situation creates delay.
it works like that:
0:0
0:5
0:11
and that's because the gamemodtext,it takes him 5.9 seconds disappear
can i get some help here?
Reply
#2

You are using style 1, and this is quoted straight from the wiki.
Quote:

Style 1

Fades out automatically after 6 secs. If you have a time setting longer than that, it will re-appear after fading out and repeat until the time ends.

So use a different style? Your call
Reply
#3

didn't noticed that..
well,i'll use TextDraws then
thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)