GetTime - 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: GetTime (
/showthread.php?tid=476091)
GetTime -
feartonyb - 16.11.2013
When I do gettime func it returns some time, but I want it to return time of one country ex. Germany
Help?
Re: GetTime -
Konstantinos - 16.11.2013
gettime gets the time of the computer the server is on. Use a GeoIP instead that allows you to get the GMT of the country.
Re: GetTime - Patrick - 16.11.2013
Quote:
Originally Posted by Konstantinos
gettime gets the time of the computer the server is on. Use a GeoIP instead that allows you to get the GMT of the country.
|
Yes, You could use this link: https://sampforum.blast.hk/showthread.php?tid=460410 to help you out
- GetPlayerHost(playerid)
- GetPlayerISP(playerid)
- GetPlayerCountryCode(playerid)
- GetPlayerCountryName(playerid)
- GetPlayerCountryRegion(playerid)
- IsProxyUser(playerid) // Returns true if a proxy is detected
Re: GetTime -
feartonyb - 16.11.2013
Any tutorial to do it, GeoIP seems just to get the country,city and ISP, I need local time
Re: GetTime -
Konstantinos - 16.11.2013
I don't think there is any tutorial but a simple search would help you to find what you want. It didn't take more than a minute:
https://sampforum.blast.hk/showthread.php?tid=296171
GetPlayerGMT(playerid);
GetIPGMT(ip[]);
---
https://sampforum.blast.hk/showthread.php?tid=32509
GetPlayerGMT(playerid);
Re: GetTime -
feartonyb - 16.11.2013
I did use search and I found that, but that can't help me. I want to set the time to be global like time in Germany
Re: GetTime -
Konstantinos - 17.11.2013
Quote:
Originally Posted by feartonyb
I did use search and I found that, but that can't help me. I want to set the time to be global like time in Germany
|
You should've said that in your first post. Use gettime function normal and then add/subtract from the hour according to the time of Germany.