SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 01/10/2014, 11:32 PM   #11
Emmet_
Guest
 
Posts: n/a
Default Re: Player country lookup

Quote:
Originally Posted by Crayder View Post
Emmet, this is more correct, yours got my location wrong! Tested a few ips, found another one that was incorrect too...
City/region detection might be a little off, did it return the correct country?
  Reply With Quote
Old 01/10/2014, 11:58 PM   #12
PinEvil
Banned
 
Join Date: Mar 2012
Location: United Kingdom ********************* Pr@gr4mm4r
Posts: 182
Reputation: 20
Default Re: Player country lookup

I like it, I'll use it for my up-coming server!
PinEvil is offline   Reply With Quote
Old 02/10/2014, 08:23 PM   #13
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,324
Reputation: 652
Default Re: Player country lookup

Quote:
Originally Posted by Emmet_ View Post
City/region detection might be a little off, did it return the correct country?
Yea it returns the right state on most of them, I ran about 50, only 4 had the wrong us state, all ip's were from US only...
BTW, do you plan on making any type of GMT returns for this, or do you think you can help me find an api that returns the gmt?

EDIT: Found this, but it would require each server owner to register :/, I found a few more but most have very low limts, ******'s API has a limit of 2500 queries per day which would be ok if we saved each players timezone and didnt send queries each time they connect...
Crayder is offline   Reply With Quote
Old 03/10/2014, 03:53 PM   #14
streetpeace
Big Clucker
 
streetpeace's Avatar
 
Join Date: May 2013
Posts: 181
Reputation: 2
Default Re : Player country lookup

It doesn't work for me, Country : Unknown, City and Region : Unknown.
streetpeace is offline   Reply With Quote
Old 07/10/2014, 11:27 AM   #15
Neil.
Gangsta
 
Neil.'s Avatar
 
Join Date: Mar 2012
Posts: 529
Reputation: 30
Default Re: Re : Player country lookup

Quote:
Originally Posted by streetpeace View Post
It doesn't work for me, Country : Unknown, City and Region : Unknown.
On first post:
Quote:
The lookup will not be conducted if the player is running on localhost, or if the IP is unknown.
It's practically the same on my side where everything on the lookup returns an 'Unknown' when hosting it locally.
__________________
Apparently, I'm turning caffeine into code in the morning.
Neil. is offline   Reply With Quote
Old 08/10/2014, 08:06 AM   #16
daniscape
Big Clucker
 
Join Date: Feb 2013
Location: Norway
Posts: 133
Reputation: 17
Default Re: Player country lookup

Good job like allways emmet! Also great work on the infinity gaming's script unfornatly alex closed down but ye the script was awesome
__________________
[CENTER]
Website: www.explosive-gaming.com
SA-MP: 23.101.115.4:7777 Or click here samp://23.101.115.4:7777
Teamspeak: 23.101.115.4:9987
daniscape is offline   Reply With Quote
Old 22/03/2015, 02:45 AM   #17
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,938
Reputation: 538
Default Re: Player country lookup

Private Paste ID: rScAHfWC
This is a private paste. If you created this paste, please login to view it.
Kar is offline   Reply With Quote
Old 22/03/2015, 09:30 AM   #18
Emmet_
Guest
 
Posts: n/a
Default Re: Player country lookup

Updated! Please re-download as I've fixed a few bugs.

This include will not work on older versions due to an update in the API.

Quote:
Originally Posted by Kar View Post
Private Paste ID: rScAHfWC
This is a private paste. If you created this paste, please login to view it.
Fixed. I actually thought that Private pastes were viewable only for those who had the link. Sorry haha.

Last edited by Emmet_; 22/03/2015 at 10:00 AM.
  Reply With Quote
Old 22/03/2015, 01:27 PM   #19
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,324
Reputation: 652
Default Re: Player country lookup

Now we're back!

I think you should add the "country_code" to this.
Crayder is offline   Reply With Quote
Old 22/03/2015, 03:04 PM   #20
Emmet_
Guest
 
Posts: n/a
Default Re: Player country lookup

Country code would be useful too. I could also add conversion functions, e.g:

pawn Code:
country = GetCountryName(COUNTRY_US);

print(country);

Would output:

Code:
United States
Country codes can also save space. I can store the country code instead of the full country name.
  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
[FilterScript] [FS] GEO-IP : Get Player's Country abhinavdabral Filterscripts 167 18/07/2017 05:05 AM
Country On Player Connect Patrick Scripting Help 0 01/12/2012 09:32 AM
[FilterScript] GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. [CRZ]xRicard[O]x. Filterscripts 12 18/10/2012 02:41 AM
Full MySQL Lookup working for my server jameskmonger Everything and Nothing 7 19/02/2011 03:48 PM


All times are GMT. The time now is 05:45 PM.


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