Questions - 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: Questions (
/showthread.php?tid=629893)
Questions -
SpaceRP - 05.03.2017
What is better to use gettime() or gettickcount() and why?
Re: Questions -
Runn3R - 05.03.2017
GetTickCount - Returns the uptime of the actual server (not the SA-MP server) in milliseconds.
gettime - The function itself returns a Unix Timestamp.
It depends what are you working on if you want to limit a player so he can't talk for a half a second because he was spamming before then u se gettickcount, if you want to limit a player function for an amount of seconds like /report use gettime() + seconds
Re: Questions -
Yousha - 05.03.2017
gettickcount() returns UP TIME of host(operation system)
Example: 24h, 3 days, 13 weeks etc
gettime() returns CURRENT TIME of host(operation system) in TIMESTAMP...
Example: 172635447 means 11:10:01, 134534235 means 07:00:23 etc