New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GeoIP data update to the automatic build system #524
Add GeoIP data update to the automatic build system #524
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paths should be okay.
You'll want to look at the other GeoIP-related changes that came to the SM version of the script after the original PR. It needed a couple of fixes for Windows, as well as being able to handle a failed download.
alliedmodders/sourcemod@c085444#diff-4f5469fd95ac0da70246f33896192d30
alliedmodders/sourcemod@e748d49#diff-4f5469fd95ac0da70246f33896192d30
alliedmodders/sourcemod@7008a56#diff-4f5469fd95ac0da70246f33896192d30
* Add GeoIP data update to the automatic build system * Apply few fixes
I need the raw long and lat for my work. Are there any plans to add it as a native please? Otherwise what are the maths to take the lon and lat for distance back to raw? When I tried to converse it the maths do not prove themselves. In fact I keep a log and see it's picking up Zeros in 1 case. When I go and check the IP it does have data. So for the distance calculations it is flawed already. I had to go back to my raw data to see. LOG Is 0 correct? Why 4.6 please? https://sciencing.com/convert-latitude-longtitude-feet-2724.html mmdblookup --file GeoLite2-City.mmdb --ip 109.25.197.97 |
@djearthquake There are |
Those 2 natives do not proof back to raw coordinates as stated in my initial post. Can you show me the maths please if they do? How is "longitude":4.744700 zero? |
They do exactly what they are supposed to. You did something wrong in your code or you didn't install the GeoIP database correctly. Please ask for assistance in the Scripting Help section on our forums. Post more information about your setup and what you did, and provide your code so people can help you out. |
amx_ctof and amx_ftoc. Is that a typo? // native geoip_latitude(const ip[]);
} // native geoip_longitude(const ip[]);
} // native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC);
} |
This is not a place for support. Please post in the forums. The AMXX code works, I tested it. |
What AMXX code works? What did you test exactly? If this is not the place for support then why am I bothering testing your work for you for free and offering solutions here on this site already? How do you think we got here? The auto packaging of GeoIP sent it to the general public in a unusable form. I sorted that? Remember? The arrogance of AMXX does not match the greatness. Really guys. Good bye. I just showed you the native was returning a 0 when bash shows there is data. There is not anything wrong with my database copy or my work. Yours buddy had the problem. How quickly you forget. Why this code roundup on the forums? Then get here with this unappreciative attitude like only 3 people can program C++ really? How clannish. This site is the source of that code it's C++ not Small Pawn Alliedmodders. You want me to broadcast this further? I shredded my databases that I could use bash and pull coordinates because you are so sure of yourself and guess what it did not do anything. It's time you take more of my advice and less of your own. Your forums are a bigot troll factory. Clean it up. Your code and packaging. |
Helping is welcomed and appreciated, but please do it the proper way. If you have an issue, always go there: https://github.com/alliedmodders/amxmodx/issues For scripting related questions, the forum is also a good place, as stated Nextra. In your case, make sure you have the latest city database from Maxmind site (we know if there an issue with the current shipped database). I tested your IP and it worked as expected:
#include <amxmodx>
#include <geoip>
public plugin_init()
{
new const ip[] = "109.25.197.97";
new const Float:lat = geoip_latitude(ip);
new const Float:long = geoip_longitude(ip);
log_amx("lat = %f", lat);
log_amx("long = %f", long);
} Note: for debugging, you can dump your IP data directly in the console: If you think there is a bug, please create an issue instead, elaborate as much as possible, and show your code as well. |
@psychonic It's based on your PR alliedmodders/sourcemod#390 but I'm unsure of paths. Will it be fine?