SXGEO Plugin Countrykicker Problem

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 16 Ное 2018, 19:44

Hello, i have a problem, this Plugin from Oxi dont work.. I tested it . i am from Germany and it should kick me but it do nothing.

Код за потвърждение: Избери целия код

 [21] SxGeo                   RUN   -    sxgeo_amxx_i386.so         v2.2             pl3  ANY   Never

Код за потвърждение: Избери целия код

[ 62] SxGeo: Country Kicker   1.0         OciXCrom          sxgeokick.amxx   running

Код за потвърждение: Избери целия код

#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
}
Any Ideas why it dont work???? I dont use VPN or anything, i am real from germany...

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

SXGEO Plugin Countrykicker Problem

Мнение от OciXCrom » 17 Ное 2018, 21:28

Maybe it's your AMXX version, but I can't tell for sure. I added some logs when a user connects. See if they show in the console and copy them here if they do.

It should say <ip> connected from <country>.

Код за потвърждение: Избери целия код

#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)

    log_amx("%s connected from %s", szIP, szCode)

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

    return PLUGIN_CONTINUE
}

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 18 Ное 2018, 11:24

[SxGeo] [POD]Jackie_Chan (95) connected ...

sxGEO WORKS but still i dont get kicked about [de] ...

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

SXGEO Plugin Countrykicker Problem

Мнение от OciXCrom » 18 Ное 2018, 14:54

Is that the exact message you're getting or did you write it manually? If it's the exact, then it's not the same as the one from the plugin. I made it print specifically the IP address and the country code in the logs. If they're not printing, probably your AMXX version is outdated. What exact 1.8.3 dev-build are you using?

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 18 Ное 2018, 19:57

It should be v1.8.3-dev+5154 .

Connect Info is:

[SxGeo] V. connected from Dublin (Leinster, Ireland)

Код за потвърждение: Избери целия код

 [  7] Admin Base              1.8.3-dev+  AMXX Dev Team     admin.amxx       stopped
 [  8] Admin Commands          1.8.3-dev+  AMXX Dev Team     admincmd.amxx    running
 [  9] Admin Help              1.8.3-dev+  AMXX Dev Team     adminhelp.amxx   running
 [ 10] Slots Reservation       1.8.3-dev+  AMXX Dev Team     adminslots.amxx  running
 [ 11] Multi-Lingual System    1.8.3-dev+  AMXX Dev Team     multilingual.am  running
 [ 12] Menus Front-End         1.8.3-dev+  AMXX Dev Team     menufront.amxx   running
 [ 13] Commands Menu           1.8.3-dev+  AMXX Dev Team     cmdmenu.amxx     running
 [ 14] Players Menu            1.8.3-dev+  AMXX Dev Team     plmenu.amxx      running
 [ 15] Maps Menu               1.8.3-dev+  AMXX Dev Team     mapsmenu.amxx    running
 [ 16] Plugin Menu             1.8.3-dev+  AMXX Dev Team     pluginmenu.amxx  running
 [ 17] Anti Flood              1.8.3-dev+  AMXX Dev Team     antiflood.amxx   running
 [ 18] Admin Chat              1.8.3-dev+  AMXX Dev Team     adminchat.amxx   running
 [ 19] Scrolling Message       1.8.3-dev+  AMXX Dev Team     scrollmsg.amxx   running
 [ 20] Info. Messages          1.8.3-dev+  AMXX Dev Team     imessage.amxx    running
 [ 21] Admin Votes             1.8.3-dev+  AMXX Dev Team     adminvote.amxx   running

Код за потвърждение: Избери целия код

 [ 3] AMX Mod X               RUN   -    amxmodx_mm_i386.so         v1.8.3-dev+5154  ini  Start ANY

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

SXGEO Plugin Countrykicker Problem

Мнение от OciXCrom » 18 Ное 2018, 21:07

Like I said, the message should be:

<IP> connected from <country code>

And you're getting this:

[SxGeo] <name> connected from <country name>

Which means this is not the same message from the plugin, but a different one sent automatically by the SxGeo module itself.
Please check if the plugin is running with the amx_plugins command. If it is, try this:

Код за потвърждение: Избери целия код

#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)
}

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 19 Ное 2018, 18:28

[ 61] SxGeo: Country Kicker 1.0 OciXCrom asxgeokick_2.am running

Self Problem, SXGEO showing country and city but from the Plugin comes nothing....... :(

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 26 Ное 2018, 19:41

Problem is solved and can be closed. Here the correct code that its working:

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <sxgeo>
#include <geoip>

new const g_szCountries[][] = { "LY" } 
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), 1) 
    geoip_code2_ex(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)
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

SXGEO Plugin Countrykicker Problem

Мнение от OciXCrom » 26 Ное 2018, 20:45

But, that plugin isn't using SXGeo. It's using the default GeoIP. Try this:

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <sxgeo>

new const g_szCountries[][] = { "LY" }
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), 1)
    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)
}

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

SXGEO Plugin Countrykicker Problem

Мнение от Infamous2018 » 27 Ное 2018, 09:41

This dont work again :(

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 14 госта