payday hour - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: payday hour (
/showthread.php?tid=182359)
payday hour -
FrankC - 10.10.2010
Hello
I want to make so you get the payday every :00 ( hour )
can anybody help me its currently set to every 3600 seconds?
Re: payday hour -
Pawno_Master - 10.10.2010
This may help you.
https://sampwiki.blast.hk/wiki/Gettime
Re: payday hour -
Rachael - 10.10.2010
set a global variable eg 'new lasthour' under gamemode init, set it to the server time hour
Put gettime(hour,minute,second) under a 60 second timer
check if hour > lasthour in the timer, if it is, call your payday function
at the end of the payday function, set lasthour to hour.
Re: payday hour -
FrankC - 10.10.2010
Quote:
Originally Posted by Pawno_Master
|
Quote:
Originally Posted by Rachael
set a global variable eg 'new lasthour' under gamemode init, set it to the server time hour
Put gettime(hour,minute,second) under a 60 second timer
check if hour > lasthour in the timer, if it is, call your payday function
at the end of the payday function, set lasthour to hour.
|
Thanks its working