SA-MP Forums Archive
GetWorldTime (something like this Please) - 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: GetWorldTime (something like this Please) (/showthread.php?tid=418163)



GetWorldTime (something like this Please) - erminpr0 - 23.02.2013

I am writing script from beginning, and now it's time to make payday system, I know how to make that, with timer, but I don't know how to get Server time, when it is xx:00 payday should show for each player who have enough payday points, If i use timers, it should be 09:25| 10:25| 11:25, you know.... depending when I start gamemode.. ?
sry 4 bad english


Re: GetWorldTime (something like this Please) - Scenario - 23.02.2013

https://sampwiki.blast.hk/wiki/Gettime

Use the gettime() function, store what it returns into variables and run a check like this:

pawn Код:
if(mins == 0)
{
   // do your stuff
}
Where "mins" is the variable you assigned minutes to be put in to.


Re: GetWorldTime (something like this Please) - erminpr0 - 23.02.2013

Thank you, but I have 2 questions..
Will that get Player's time or Server time, and i should set timer with repeating every 1 minute, to check that time, and show player payday?


Re: GetWorldTime (something like this Please) - Scenario - 23.02.2013

It will get the server time, not the player's time.

It would be a good idea to put it in a repeating one minute timer, yes.


Re: GetWorldTime (something like this Please) - erminpr0 - 23.02.2013

I succesfully made it, thank you master