How To Get Date - 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: How To Get Date (
/showthread.php?tid=355589)
How To Get Date -
Prosettur - 30.06.2012
Example: Now is 30, what be for 30 days?
Re: How To Get Date -
Calgon - 30.06.2012
You can use
unix timestamps to calculate it. Once you've calculated, you can use a function in the thread (timec) to convert that to a relative time format.
All you have to do is 60 * 60 * 24 * 30 to calculate how many seconds it'll be in 30 days.
The link for 'unix timestamps' directs to a tutorial which also has an example on how you can do this with extra code.