Timer time left
#1

Hi. How to get time left from timer? I need to get time, that left to end of this timer.

My timer:
Код:
SetTimerEx("eventend", 1000*60*10, false,"");
Reply
#2

Код:
new eventendtime;
Код:
evendendtime = 10/60; // Instead of the settimer
Код:
new str[128];
if(evendendtime)
{
	format(str, sizeof(str), "bla bla bla %d", evendendtime);
	SendClientMessage(playerid, -1, str);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Zamora
Посмотреть сообщение
Код:
new eventendtime;
Код:
evendendtime = 10/60; // Instead of the settimer
Код:
new str[128];
if(evendendtime)
{
	format(str, sizeof(str), "bla bla bla %d", evendendtime);
	SendClientMessage(playerid, -1, str);
    return 1;
}
lol what in the fuck...


OP... Use a few timers. Say for instance you have a 10 minute round,want a 2 minute warning, along with a 20 second countdown.

First timer runs for 8 minutes, then fires the 2 minute warning, invoking the timer for 100 seconds, last timer is a tick timer, running for 21 seconds, so you can do 20-15-10-5-4-3-2-1-finish countdown.

Along with this, you could use something to check that your timers are semi-accurate by counting the ms they are, and comparing them to GetTick(**?) and just making sure they aren't stalling, or falling out of step.


There are other scenarios where this can also apply, what's the scenario you are doing this in?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)