Hey guys i wanna make a simple aim info plugin with module geoip extended. The plugins compiles. I have enabled the geoip module in my server(also GeoIPCity.dat) But the plugin says countries like estonia which aren't the tru ones... plx help me to fix it
Code:
#include <amxmodx>
#include <geoip>
#include <cstrike>
#define PLUGIN "Aim Info Remake"
#define VERSION "1.0"
#define AUTHOR "Oxygen"
new g_status_sync
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
g_status_sync = CreateHudSyncObj()
}
public showStatus(id)
{
if(!is_user_bot(id) && is_user_connected(id))
{
new name[32], pid = read_data(2)
get_user_name(pid, name, 31)
new h = get_user_health(pid)
new s = get_user_armor(pid)
new j = cs_get_user_money(pid)
if (cs_get_user_team(id) == CS_TEAM_T && cs_get_user_team(pid) == CS_TEAM_T)
{
new const Ip[] = "85.196.220.208";
new Country[ 45 ];
new City[ 45 ];
new RegionName[ 45 ];
geoip_country( Ip, Country, charsmax( Country ) );
geoip_city( Ip, City, charsmax( City ) );
geoip_region_name( Ip, RegionName, charsmax( RegionName ) );
set_hudmessage(0, 255, 255, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
ShowSyncHudMsg(id, g_status_sync, "Player = %s | HP: %d | Armor: %d | Money: %d^nCountry: %s | City: %s | Region: %s", name, h, s, j, Country, City, RegionName)
}
}
}
public hideStatus(id)
{
ClearSyncHud(id, g_status_sync)
}