The Module SXGEO is running, (https://dev-cs.ru/threads/2733/ )
the Plugin is showing running,
i am running 1.8.3 plugins and reamxmod 1.8.3
Maybe anyone have an idea why it dont work... I am from Germany so i added "de" and it should kick me but nothing happens...
here is the SMA
Code: Select all
#include <amxmodx>
#include <sxgeo>
new const g_szCountries[][] = { "bg", "de" }
new const g_szKickReason[] = "Players from your country are not allowed here."
new Trie:g_tCountries
public plugin_init()
{
register_plugin("SxGeo: Country Kicker", "1.0", "OciXCrom")
g_tCountries = TrieCreate()
for(new i; i < sizeof(g_szCountries); i++)
TrieSetCell(g_tCountries, g_szCountries[i], true)
}
public plugin_end()
TrieDestroy(g_tCountries)
public client_connect(id)
{
new szIP[22], szCode[3]
get_user_ip(id, szIP, charsmax(szIP))
sxgeo_code(szIP, szCode)
log_amx("%s connected from %s", szIP, szCode)
if(TrieKeyExists(g_tCountries, szCode))
server_cmd("kick #%i ^"%s^"", get_user_userid(id), g_szKickReason)
}