It is currently 16 Dec 2018 13:19



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 2 posts ] 
 SXGEO Plugin Countrykicker Fix Pls 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 11 Feb 2017 12:13
Posts: 103
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
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)
}


25 Nov 2018 17:56
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 06 Oct 2016 15:43
Posts: 79
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Nu
SteamID: ---
Fond eXtream: 0
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_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
}

_________________
ImageImage

Image

Image

Image

| Afiseaza codul
phpBB [media]


28 Nov 2018 16:45
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: faKe91, ImparctVirtual, Majestic-12 [Bot], RealAlexanderTr and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group