PayDay once a day - how to?
#7

Quote:
Originally Posted by MenaceX^
Sure.
pawn Код:
SetTimer("Payday",1000,true);// to OnGameModeInit
forward MainTimer(); // somewhere
public MainTimer()
{
  new hour,mins,sec;
  gettime(hour,mins,sec);
  if(mins==24&&sec==00)
    PayDay();
}
That's not correct, should be this:

pawn Код:
SetTimer("Payday",1000,true);// to OnGameModeInit
forward MainTimer(); // somewhere
public MainTimer()
{
  new hours, minutes, secconds;
  gettime(hours, minutes, secconds);
  if(hours == 0 && minutes == 0 && secconds == 0) // This would launche at 0:00, that's the same as 24:00 (but the last one is impossible)
  {
    PayDay();
  }
}
Reply


Messages In This Thread
PayDay once a day - how to? - by kacperoo - 24.04.2009, 18:27
Re: PayDay once a day - how to? - by MenaceX^ - 24.04.2009, 18:31
Re: PayDay once a day - how to? - by kacperoo - 24.04.2009, 18:40
Re: PayDay once a day - how to? - by MenaceX^ - 24.04.2009, 18:43
Re: PayDay once a day - how to? - by kacperoo - 24.04.2009, 18:45
Re: PayDay once a day - how to? - by MenaceX^ - 24.04.2009, 18:48
Re: PayDay once a day - how to? - by Andom - 24.04.2009, 19:00
Re: PayDay once a day - how to? - by MenaceX^ - 24.04.2009, 19:00
Re: PayDay once a day - how to? - by kacperoo - 24.04.2009, 20:08
Re: PayDay once a day - how to? - by Joe Staff - 24.04.2009, 20:30

Forum Jump:


Users browsing this thread: 2 Guest(s)