Ok, I have this GEOIP plugin that's made by Eisbein, he refuses to fix this problem so I tried fixing it myself but I can't get it to work. What happens is this plugin will display what country your from and when I connect to my server on the LAN, it will show ERROR for me since I have a LAN IP, all bots on CS/CZ will show the same thing so I wanted to know if it's possible to make it show BOT for BOTs and show LAN for addresses in the 192.168.0.0-192.168.255.255/10.0.0.0-10.255.255.255 ranges. I know this is mainly because of the GEOIP module not understanding Bots or LANs but how do I make it so this plugin will do that check, everything I've tried hasn't worked for me.
Here's the plugin without any changes made to it:
Code:
/*
* AMX MODX SCRIPT
*
* show land / Country in Spect
*
* by Eisbein >>[email protected]
* use / benutze say /country or /land
*
* mfG PAPA_SCHLUMPF
*/
#include <amxmodx>
#include <geoip>
new playerip
[17], getcountry
[46], country
[33][46]
public plugin_init
()
{
register_plugin("Land",
"1.0",
"Eisbein")
register_event("StatusValue",
"show_country",
"bd",
"1=2")
register_clcmd("say /country",
"show_owncountry")
register_clcmd("say /land",
"show_owncountry")
register_cvar("amx_showcountry",
"1")
}
public client_connect
(id
)
{
if (!
(get_cvar_num("amx_showcountry")))
{
return PLUGIN_CONTINUE
}
get_user_ip(id, playerip,
16,
1)
geoip_country
(playerip,getcountry
)
country
[id
] = getcountry
return PLUGIN_CONTINUE
}
public show_country
(id
)
{
if (!
(get_cvar_num("amx_showcountry")))
{
return PLUGIN_CONTINUE
}
new target =
read_data(2)
if (target != id && target !=
0)
{
set_hudmessage(0,
255,
255,
-1.0,
0.35,
0,
6.0,
6.0,
0.5,
0.15,
27)
show_hudmessage(id,
"%s",country
[target
])
}
return PLUGIN_CONTINUE
}
public show_owncountry
(id
)
{
client_print(id,print_chat,
"%s",country
[id
])
return PLUGIN_HANDLED
}