Hello everyone im making a lottery system but i need help here!!!!

The Timer:-

My problem is I Want it given him the message at 6:00 and lottery winning's at 16:00 how should i did it?... i already make a timer and everything is done but i dont knw what is timers like

15000 = what ... so can u help me?

EDITED:- I Want LottoShow()must be show at 6:00
new time;
forward LottoShow();
public LottoShow()
   new string[256];
   format(string, sizeof(string), "{00FF00}[LOTTERY]: The current Jackpot is: $%d The Lottery will be draw in 4 game Hours!",Jackpot);
   SendClientMessageToAll(COLOR_WHITE, string);
   time = SetTimer("LottoWiner",15000,1);
   return 1;

And this at 16:00
forward LottoWiner();
public LottoWiner()
	new rand = randomEx(1,MAX_NUMBERS);
	if(rand < MAX_NUMBERS - 3) { rand += 3; }
	Timer = SetTimer("LottoShow", 1000*(LottoTime*60), 1);

Is this you want?> pls help

15000 is 15 seconds, that's what I know…

@Tom, i need if timer starting at 00:00 The message given him after 6:00 so at 16:00 = who's winning lotto.

i find one is: 400000 = 6mintes and 600000 = 10mintes... but how should i use it

Larger timer values will become inaccurate.

If you are using a filterscript to do your game time, then you could call the lotto functions from the filterscript. That'd then make it synced to the right time.

Otherwise, smaller timers, using gettime and checking how long in total they've been running could be a better plan.

I've always been a fan of a 1 second tick timer, that simply does smaller things. You could run a 1 minute one, or for more 'accuracy' you could do a 15 second one to track the segments, 4 hours in gametime being 4 minutes, and then needing to track the other 20 hours (20 minutes) to restart the drawing.


I suppose you already have something that advances the clock so just hook it into there.

Forum Jump:

Users browsing this thread: 1 Guest(s)