[SNIPPET] Get Client's City
I know with geoip you can get client's countrys.
Now with this you can get cities/towns also I'll have to thanks to Alka for making this on amxx First download this : http://geolite.maxmind.com/download/...y_20090601.zip Extract, and put that 2 files .csv in your /sourcemod/configs/geoip/ folder code: Code:
My result: I'm from City : Piatra Neamt (IP:1449916455 | Locid:52753) |
Re: [SNIPPET] Get Client's City
Heh ;P
|
Re: [SNIPPET] Get Client's City
1. "I'll have to thanks to Alka for making this on amxx"
where is amxx version? i search and didt find .. pls a link 2. Can u make to show for any player when they join in server ? and show isp too? ty and sorry for my english |
Re: [SNIPPET] Get Client's City
I don't still have amxx version but it's simple to convert it
About isp, via sourcemod is impossible. For amxx you can use netdb module |
Re: [SNIPPET] Get Client's City
Sure is nice and all as a feature, but it takes like 3 to 5 seconds to get the location (at least for me) and it makes the server freeze during the query... that's not cool. :nono:
|
Re: [SNIPPET] Get Client's City
yea i noticed that. For me also it takes few seconds (Romania) ;
Someone from USA tested and no server freeze |
Re: [SNIPPET] Get Client's City
how to convert this script to amxmodx ?
please help me |
Re: [SNIPPET] Get Client's City
Very nice snippet Samurai/Alka :)
Innovative features such as this are very cool to see, even if they have bugs. |
Re: [SNIPPET] Get Client's City
Good job Samurai.
You can write a script that will convert this file into sqlite DB on plugin start so during the game there won't be any lags, you can use TQueries for this. p.s. it seems that link is broken (The requested [url] was not found on this server.) |
Re: [SNIPPET] Get Client's City
the link is with old database
updated |
Re: [SNIPPET] Get Client's City
samurai could you make this ,working with amxx ?
i don`t know to convert from source to amxx |
Re: [SNIPPET] Get Client's City
samurai thank you for your help
you are a good man ! |
Re: [SNIPPET] Get Client's City
FYI, this has been updated since the first post. You can get the (current) newest version here:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_20090801.zip It's updated on the first day of every month. You can get the new file here: http://www.maxmind.com/app/geolitecity Just look for the link that says "Download the latest GeoLite City CSV Format". |
Re: [SNIPPET] Get Client's City
How to use it?
I have compiled a code, have put in <server>\addons\sourcemod\plugins\ Extract .csv files in <server>\addons\sourcemod\configs\geoip But at connect on a server, in a chat the information on a city of the player is not deduced p.s. Tested on L4D2 (sm 1.4.0 (Dec 16 2009), sm 1.3.0 (xx xx 2009)) and TF2 (sm 1.2.3 (Aug 28 2009)) |
Re: [SNIPPET] Get Client's City
Can someone post a compiled version? It's not working for me..
|
Re: [SNIPPET] Get Client's City
Same here, errors compiling on web compiler AND compiler in local sourcemod folder. Same errors for each compiler.
Code:
/home/groups/sourcemod/upload_tmp/phpDes4Ex.sp(0) : error 075: input line too long (after substitutions) |
Re: [SNIPPET] Get Client's City
3 Attachment(s)
I DL the most recent .CSV files from the link in bl4nks's post above.
Added them to configs/geoip folder. I also copied and pasted SAMURAI's original code onto Notepad++ and recompiled and tested. It worked but lagged the server big time. It prints out an ip that is unfamiliar to me but, did a little more snooping around. If you go HERE you can try the demo and put your ip that prints to chat and its right on the money. Tested plugin on L4d running windows. If we can get someone to right a script as exvel stated here it would be a lot better. Screen shot of print to chat and .smx and .sp attached. |
Re: [SNIPPET] Get Client's City
The only issue I see with this is that it could be a whole privacy thing, implementing it any plugin I'd suggest making a menu that asks the player if they'd allow it like most browsers with Geoip.
|
Re: [SNIPPET] Get Client's City
Maxmind geolitecity database is huge.
Correct method will be import csv files into MySQL and special fast query to take data. http://atomboy.isa-geek.com/plone/Me...ile-into-mysql |
Re: [SNIPPET] Get Client's City
Does not work =(((
|
| All times are GMT -4. The time now is 18:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.