A little problem with the timer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A little problem with the timer (
/showthread.php?tid=333240)
A little problem with the timer -
VeryGooD - 10.04.2012
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?
Re: A little problem with the timer -
ReneG - 10.04.2012
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
Re: A little problem with the timer -
VeryGooD - 10.04.2012
didn't noticed that..
well,i'll use TextDraws then
thanks