Raised This Month: $51 Target: $400
 12% 

SXGEO Module (Country Kicker Plugin fix/help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 11-25-2018 , 10:57   SXGEO Module (Country Kicker Plugin fix/help
Reply With Quote #1

Hello i got an Plugin from Oxi who should kick forbidden Countries but the Plugin dont work.

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:
#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)
}
Godofwar is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode