SXGEO Plugin Countrykicker Fix Pls

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Infamous2017
Membru, skill +1
Membru, skill +1
Posts: 228
Joined: 11 Feb 2017, 12:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times
Contact:

25 Nov 2018, 17:56

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: 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)
}
RoyalServer 2
User avatar
alexz24
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 06 Oct 2016, 16:43
Detinator Steam: Da
CS Status: a-mix.ro
Detinator server CS: DA
SteamID: ---
Fond eXtream: 0
Has thanked: 1 time
Contact:

28 Nov 2018, 16:45

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_connectex(id, const szName[], const szIP[], szReason[128])
{
    new szCode[3]
    sxgeo_code(szIP, szCode)

    if(TrieKeyExists(g_tCountries, szCode))
    {
        copy(szReason, charsmax(szReason), g_szKickReason)
        return PLUGIN_HANDLED
    }

    return PLUGIN_CONTINUE
}
My steam :hand_over_mouth:
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 15 guests