How to make a watch clock? - 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 make a watch clock? (
/showthread.php?tid=536407)
How to make a watch clock? -
Alex MagaŃa - 09.09.2014
Hello guyz i'm trying to make a watch clock time example:
When a player join the server in /stats his days will be 0/1000.
A-EX:
Days: 0/1000
Days: 200/1000
Days: 500/1000
Days: 1000/1000
I want to know how to do it! With save status e.t.c.
Re: How to make a watch clock? -
Riddick94 - 09.09.2014
When player is going to register on the server, save his current time & date when he registered. Then, whenever player login, check if current time minus his registered time is higher or equal to 24h, if it is, increase his array days value up and save the array value back to the database.
Also, make sure that you have (updated) last logged in time and date, so make some extra checks as well, to make sure that he doesn't disconnect and connect back again, because you may receive a false values, and his array will increase by one everytime he connects.
Tip:
Type "Timestamp SA-MP" in ******.
Re: How to make a watch clock? -
davve95 - 09.09.2014
Not a solution for your question but I got a really cool suggestion.
You can set the camera view on your arm.
And then make a round textdraw on it or digital clock...