Timer Help [Minutes] - 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: Timer Help [Minutes] (
/showthread.php?tid=449029)
Timer Help [Minutes] -
Jermi - 07.07.2013
Guys i want to make SetTimerEx...To 1 hour how? Is it 30000 or What? give me the seconds/Minutes of 1 hour in SetTimerEx
Re: Timer Help [Minutes] -
[HiC]TheKiller - 07.07.2013
Timers are done by milliseconds.
1000 milliseconds = 1 second
60 seconds = 1 minute
60 minutes = 1 hour
So lets just calculate 1 hour in milliseconds.
1000 * 60 * 60 = 3600000.
Re: Timer Help [Minutes] -
Jermi - 07.07.2013
Thank you +reped
Re: Timer Help [Minutes] -
Deathstalker - 07.07.2013
If you don't want to calculate all the times you can always use these macros I just created:
pawn Код:
#define MS_HOUR(%1) 3600000*%1
#define MS_MINUTE(%1) 60000*%1
pawn Код:
main()
{
printf("%d", MS_HOUR(5));
printf("%d", MS_MINUTE(1));
}
Will output:
Re: Timer Help [Minutes] -
Pottus - 07.07.2013
Quote:
Originally Posted by [HiC]TheKiller
Timers are done by milliseconds.
1000 milliseconds = 1 second
60 seconds = 1 minute
60 minutes = 1 hour
So lets just calculate 1 hour in milliseconds.
1000 * 60 * 60 = 3600000.
|
All right but at the same time all wrong refer to this.
https://sampforum.blast.hk/showthread.php?tid=289675