SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/11/2013, 04:55 PM   #1
feartonyb
Huge Clucker
 
feartonyb's Avatar
 
Join Date: Feb 2012
Location: Knin, Croatia
Posts: 319
Reputation: 12
Default GetTime

When I do gettime func it returns some time, but I want it to return time of one country ex. Germany

Help?
feartonyb is offline   Reply With Quote
Old 16/11/2013, 05:06 PM   #2
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: GetTime

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.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 16/11/2013, 05:10 PM   #3
Patrick
Guest
 
Posts: n/a
Default Re: GetTime

Quote:
Originally Posted by Konstantinos View Post
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: http://forum.sa-mp.com/showthread.php?t=460410 to help you out
  • GetPlayerHost(playerid)
  • GetPlayerISP(playerid)
  • GetPlayerCountryCode(playerid)
  • GetPlayerCountryName(playerid)
  • GetPlayerCountryRegion(playerid)
  • IsProxyUser(playerid) // Returns true if a proxy is detected
  Reply With Quote
Old 16/11/2013, 06:56 PM   #4
feartonyb
Huge Clucker
 
feartonyb's Avatar
 
Join Date: Feb 2012
Location: Knin, Croatia
Posts: 319
Reputation: 12
Default Re: GetTime

Any tutorial to do it, GeoIP seems just to get the country,city and ISP, I need local time
feartonyb is offline   Reply With Quote
Old 16/11/2013, 08:17 PM   #5
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: GetTime

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:

http://forum.sa-mp.com/showthread.php?t=296171

GetPlayerGMT(playerid);
GetIPGMT(ip[]);

---

http://forum.sa-mp.com/showthread.php?t=32509

GetPlayerGMT(playerid);
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 16/11/2013, 10:04 PM   #6
feartonyb
Huge Clucker
 
feartonyb's Avatar
 
Join Date: Feb 2012
Location: Knin, Croatia
Posts: 319
Reputation: 12
Default Re: GetTime

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
feartonyb is offline   Reply With Quote
Old 17/11/2013, 09:45 AM   #7
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: GetTime

Quote:
Originally Posted by feartonyb View Post
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.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Gettime Ban .ThePro Português/Portuguese 3 20/05/2013 08:28 PM
[Ajuda] GetTime Gleisson_. Português/Portuguese 5 26/04/2013 04:57 PM
[Ajuda] GetTime s4kuL Português/Portuguese 1 30/08/2012 02:43 AM
gettime bug? SomebodyAndMe Scripting Help 14 28/05/2012 07:10 PM
Gettime coole210 Help Archive 27 21/06/2010 09:01 PM


All times are GMT. The time now is 02:14 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.