![]() |
|
[Plugin] Maxora - Printable Version +- open.mp forum (https://forum.open.mp) +-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) +--- Forum: Releases (https://forum.open.mp/forumdisplay.php?fid=13) +---- Forum: Plugins (https://forum.open.mp/forumdisplay.php?fid=32) +---- Thread: [Plugin] Maxora (/showthread.php?tid=4324) |
Maxora - itskoleban - 2026-07-16 Maxora Highly optimized, zero-allocation MaxMind DB component for open.mp Maxora is a production-ready component designed specifically for modern open.mp servers. It allows you to natively query MaxMind DB (.mmdb) databases directly from your Pawn scripts to instantly geolocate IPs (Country, City, ASN, ISP) without choking your main server thread. Features
Usage Example Maxora comes with pre-made stock helpers to simplify common queries and supports up to 8 localized languages out of the box! Code: #include <open.mp>
#include <maxora>
main() {}
public OnGameModeInit() {
// The path resolves from your server's root directory.
// You can place it anywhere, for example inside scriptfiles:
if (MMDB_Load("scriptfiles/GeoLite2-City.mmdb")) {
print("[MMDB] Database loaded successfully.");
} else {
new err[128];
MMDB_GetLastError(err, sizeof(err));
printf("[MMDB] Failed to load database. Reason: %s", err);
}
return 1;
}
public OnPlayerConnect(playerid) {
new ip[16], country[64];
GetPlayerIp(playerid, ip, sizeof(ip));
// Querying a localized English country name using stock helpers
if (MMDB_GetCountryName(ip, country, sizeof(country), MMDB_LANG_ENGLISH)) {
printf("[MMDB] Player %d connected | IP: %s | Country: %s", playerid, ip, country);
} else {
new err[128];
MMDB_GetLastError(err, sizeof(err));
printf("[MMDB] Player %d connected | IP: %s | Country: Unknown (Reason: %s)", playerid, ip, err);
}
return 1;
}Download & Installation Requirements: open.mp server (Windows or Linux x86).
Source Code Maxora is fully open-source and natively built against the modern IComponent open.mp SDK interface. https://github.com/itskoleban/Maxora |