AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Req] GeoIP2 (https://forums.alliedmods.net/showthread.php?t=250112)

plazma 10-18-2014 12:52

[Req] GeoIP2
 
Quote:

Originally Posted by souvikdas95 (Post 2127591)
Please add ISP as well. You might want to shift to GeoIP2 Databases and API.

Can explain anynone here how it work or source because not work in old versions geoip...

claudiuhks 10-18-2014 21:46

Re: [Req] GeoIP2
 
GeoIP2 is now available at http://amxmodx.org/snapshots.php.
Create a file like JoinIP.sma inside 'scripting' folder and fill it up with the code below.

PHP Code:

#include amxmodx
#include geoip

public client_putinserver(i)
{
  static 
a[64], b[64], c[64], w[64], x;

  
get_user_name(iw63);
  
get_user_ip(ia631);
  
x=geoip_country(ab63); if (!x"N/A";
  
x=geoip_city(ac63); if (!x"N/A";

  
client_print(0print_chat"%s connected from %s (city), %s (country)"wcb);


http://dev.maxmind.com/geoip/geoip2/geolite2/

Download GeoLite City, extract it and place it inside 'data' directory.
All done.

plazma 10-19-2014 07:48

Re: [Req] GeoIP2
 
Code:

[AMXX] Plugin "CONNECT.amxx" failed to load: Plugin uses an unknown function (name "geoip_city") - check your modules.ini.
I put new geoip dll
I compile with new geoip

claudiuhks 10-19-2014 12:02

Re: [Req] GeoIP2
 
Quote:

Originally Posted by plazma (Post 2212944)
Code:

[AMXX] Plugin "CONNECT.amxx" failed to load: Plugin uses an unknown function (name "geoip_city") - check your modules.ini.
I put new geoip dll
I compile with new geoip

If the plugin compiles well, it means geoip.inc file is up to date (scripting).
Ensure the game server is running GeoIP module properly (the newer version).
Close it, upload the GeoIP module then start it again.

plazma 10-19-2014 13:12

Re: [Req] GeoIP2
 
Quote:

Originally Posted by claudiuhks (Post 2213043)
If the plugin compiles well, it means geoip.inc file is up to date (scripting).
Ensure the game server is running GeoIP module properly (the newer version).
Close it, upload the GeoIP module then start it again.

I compiled it fine with new geoip.inc up to date...

I have uploads new modules geoip_amxx.dll modules.ini geoip upload amxmodx_mm.dll and I download GeoLite2-City.mmdb rename to GeoLite2City.dat <- (but I don't know is good this name for GeoIP2) ?

Code:

amxmodx-1.8.3-dev-git4453-base-windows\addons\amxmodx\data
rename to GeoLite2-Country.dat <- (don't know is good for new GeoIP2) tell me or post one simple addon to helpful thanks...

sory my bad eng...

claudiuhks 10-19-2014 13:57

Re: [Req] GeoIP2
 
You don't have to rename anything.

plazma 10-19-2014 14:31

Re: [Req] GeoIP2
 
Quote:

Originally Posted by claudiuhks (Post 2213120)
You don't have to rename anything.

Ah.. now is good but no detected anything??

http://i.imgur.com/DRtNT3i.png


All times are GMT -4. The time now is 17:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.