Minute.. - 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: Minute.. (
/showthread.php?tid=309000)
Minute.. -
DarkKillerWithPride<3 - 05.01.2012
Hey,
I saw somewhere that you could define a minute. Whats the correct definition or is it simple as:
pawn Код:
#define MINUTE(%0) (60*60)
Also could the same thing be done for an hour? If so how?
Thanks
Re: Minute.. -
[HiC]TheKiller - 05.01.2012
Why would you need a param? Doing an hour is just
Re: Minute.. -
DarkKillerWithPride<3 - 05.01.2012
Ahh I see and I think it was used more like SetTimer("FuncName",MINUTE(12),true); Or something like that I forgot what thread it was used as would I just use SetTimer("FuncName",MINUTE*12,true); for 12mins? Sorry my maths sucks

. Thanks in advance
Re: Minute.. -
[HiC]TheKiller - 05.01.2012
Timers use milliseconds, so you would just do this:
pawn Код:
#define SECONDS(%1) (%1 * 1000)
#define MINUTES(%1) (%1 * 60000)
#define HOURS(%1) (%1 * 3600000)
#define DAYS(%1) (%1 * 86400000)
Re: Minute.. -
DarkKillerWithPride<3 - 05.01.2012
Thanks Bro <3 and rep+
EDIT: Gotta spread some first
Re: Minute.. -
DarkKillerWithPride<3 - 05.01.2012
Would something like this work though?
pawn Код:
#define Seconds(%1) (%1 * 1000)
#define Minutes(%1) (%1 * Seconds * 60)
Thanks
EDIT: Sorry for double post thought I was editing