WarGods plugin

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
104
Реакции
23
Помог
2 раз(а)
Привет. Нашел на форуме wargods плагин, который переводит по команде /scan Player игрока в спектора и показывает motd окно, с инструкцией как пройти проверку. Если игрок отказывается и выходит с сервера - получает бан по ip на определенное время... (2 мин)

Вопрос следующий, как поменять, чтоб банило не по ip а с помощью обычного FreshBans/AmxBan с причиной "отказ от проверки"???

Или может уже есть подобное готовое решение?

Заранее благодарю за помощь)

Код:
/* WarGods Community
Plugin by: LiOn
Credits: DanN
Plugin: Comanda cerere wCD
*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Cerere wCD"
#define VERSION "1.1"
#define AUTHOR "DanN / LiOn"

#define TAG "WarGods"

#define MOTD_LOCATION "addons/amxmodx/configs/wcdinfo.html"

new bool:hascan[33], cvars[3]
new store_team

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)

    register_clcmd("say", "cmd_say")
    register_clcmd("say_team", "cmd_say")

    cvars[0] = register_cvar("wcd_disconnect_ban", "1")
    cvars[1] = register_cvar("wcd_minim_acces_flag", "d") // kick acces
    cvars[2] = register_cvar("wcd_time_for_ban", "2")

    register_dictionary("wcd_scan.txt")
}

public client_connect(id)
{
    hascan[id] = false
}

public client_disconnect(id)
{
    if(hascan[id] && get_pcvar_num(cvars[0]) == 1)
    {
        new ip[32]
        get_user_ip(id, ip, charsmax(ip), 1)

        hascan[id] = false
        server_print("%s", ip)
        client_cmd(0, "spk ^"vox/bizwarn eliminated")
        server_cmd("addip %d %s;writeip",get_pcvar_num(cvars[2]), ip)
        server_exec()
    }
}


public cmd_say(id)
{
    new szSaid[192]
    read_args(szSaid, charsmax(szSaid))
    remove_quotes(szSaid)

    if(contain(szSaid, "/scan") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, sizeof(target) -1, szSaid[6])
            new player = cmd_target(id, target, 2)

            if(player)
            {
                new pname[32], admin[32]
                get_user_name(player, pname, charsmax(pname))
                get_user_name(id, admin, charsmax(admin))

                if(hascan[player])
                {
                    ColorChat(id, "%L", LANG_SERVER, "ALREADY_HAVE", TAG)
                    return PLUGIN_HANDLED
                }
                else
                {
                    new timer[64]
                    get_time("%d/%m/%Y - %H:%M:%S", timer, charsmax(timer))
                    hascan[player] = true
                    store_team = get_user_team(player)
                    user_silentkill(player)
                    cs_set_user_team(player, CS_TEAM_SPECTATOR)

                    ColorChat(0, "%L", LANG_SERVER, "MAKE_WCD", TAG, admin, pname, timer)
                    ColorChat(0, "%L", LANG_SERVER, "DOWNLOAD_LINK", TAG)
                    ColorChat(0, "%L", LANG_SERVER, "INFO_WCD", TAG)
                    client_cmd(id, "snapshot")
                    return PLUGIN_CONTINUE
                }
            }
            else
            {
                ColorChat(id, "%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(contain(szSaid, "/clean") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, charsmax(target), szSaid[7])
            new player = cmd_target(id, target, 2)

            if(player)
            {
                new pname[32]
                get_user_name(player, pname, charsmax(pname))
                cs_set_user_team(player, store_team)
                hascan[player] = false

                ColorChat(0, "%L", LANG_SERVER, "PLAYER_CLEAN", TAG, pname)
                return PLUGIN_CONTINUE
            }
            else
            {
                ColorChat(id, "%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(equal(szSaid, "/infowcd") || equal(szSaid, "/wcd"))
    {
        show_motd(id, MOTD_LOCATION)
    }

    return PLUGIN_CONTINUE
}



stock ColorChat(const id, const input[], any:...)
{
    new Count = 1, Players[32];
    static Msg[191];
    vformat(Msg, 190, input, 3);

    replace_all(Msg, 190, "!g", "^4");
    replace_all(Msg, 190, "!y", "^1");
    replace_all(Msg, 190, "!t", "^3");

    if(id) Players[0] = id; else get_players(Players, Count, "ch");
    {
        for (new i = 0; i < Count; i++)
        {
            if (is_user_connected(Players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
                write_byte(Players[i]);
                write_string(Msg);
                message_end();
            }
        }
    }
    return PLUGIN_HANDLED
}
 
Последнее редактирование:
  • Нравится
Реакции: devl
Сообщения
494
Реакции
340
Помог
11 раз(а)
Код:
/* WarGods Community
Plugin by: LiOn
Credits: DanN
Plugin: Comanda cerere wCD
*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Cerere wCD"
#define VERSION "1.1"
#define AUTHOR "DanN / LiOn"

#define TAG "WarGods"

#define MOTD_LOCATION "addons/amxmodx/configs/wcdinfo.html"

new const REASON_BAN[] = "Failed verification";

new bool:hascan[33], cvars[3]
new store_team

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)

    register_clcmd("say", "cmd_say")
    register_clcmd("say_team", "cmd_say")

    cvars[0] = register_cvar("wcd_disconnect_ban", "1")
    cvars[1] = register_cvar("wcd_minim_acces_flag", "d") // kick acces
    cvars[2] = register_cvar("wcd_time_for_ban", "2")

    register_dictionary("wcd_scan.txt")
}

public client_connect(id)
{
    hascan[id] = false
}

public client_disconnect(id)
{
    if(hascan[id] && get_pcvar_num(cvars[0]) == 1)
    {
        new sName[32];
        get_user_name(id, sName, charsmax(sName));
    
        hascan[id] = false
        client_cmd(0, "spk ^"vox/bizwarn eliminated")
        server_cmd("amx_ban %s %i %s", sName, get_pcvar_num(cvars[2]), REASON_BAN)
    }
}


public cmd_say(id)
{
    new szSaid[192]
    read_args(szSaid, charsmax(szSaid))
    remove_quotes(szSaid)

    if(contain(szSaid, "/scan") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, sizeof(target) -1, szSaid[6])
            new player = cmd_target(id, target, 2)

            if(player)
            {
                new pname[32], admin[32]
                get_user_name(player, pname, charsmax(pname))
                get_user_name(id, admin, charsmax(admin))

                if(hascan[player])
                {
                    ColorChat(id, "%L", LANG_SERVER, "ALREADY_HAVE", TAG)
                    return PLUGIN_HANDLED
                }
                else
                {
                    new timer[64]
                    get_time("%d/%m/%Y - %H:%M:%S", timer, charsmax(timer))
                    hascan[player] = true
                    store_team = get_user_team(player)
                    user_silentkill(player)
                    cs_set_user_team(player, CS_TEAM_SPECTATOR)

                    ColorChat(0, "%L", LANG_SERVER, "MAKE_WCD", TAG, admin, pname, timer)
                    ColorChat(0, "%L", LANG_SERVER, "DOWNLOAD_LINK", TAG)
                    ColorChat(0, "%L", LANG_SERVER, "INFO_WCD", TAG)
                    client_cmd(id, "snapshot")
                    return PLUGIN_CONTINUE
                }
            }
            else
            {
                ColorChat(id, "%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(contain(szSaid, "/clean") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, charsmax(target), szSaid[7])
            new player = cmd_target(id, target, 2)

            if(player)
            {
                new pname[32]
                get_user_name(player, pname, charsmax(pname))
                cs_set_user_team(player, store_team)
                hascan[player] = false

                ColorChat(0, "%L", LANG_SERVER, "PLAYER_CLEAN", TAG, pname)
                return PLUGIN_CONTINUE
            }
            else
            {
                ColorChat(id, "%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(equal(szSaid, "/infowcd") || equal(szSaid, "/wcd"))
    {
        show_motd(id, MOTD_LOCATION)
    }

    return PLUGIN_CONTINUE
}

stock ColorChat(const id, const input[], any:...)
{
    new Count = 1, Players[32];
    static Msg[191];
    vformat(Msg, 190, input, 3);

    replace_all(Msg, 190, "!g", "^4");
    replace_all(Msg, 190, "!y", "^1");
    replace_all(Msg, 190, "!t", "^3");

    if(id) Players[0] = id; else get_players(Players, Count, "ch");
    {
        for (new i = 0; i < Count; i++)
        {
            if (is_user_connected(Players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
                write_byte(Players[i]);
                write_string(Msg);
                message_end();
            }
        }
    }
    return PLUGIN_HANDLED
}
 
Сообщения
237
Реакции
10
Where can I find this plugin? Because the LANG .txt file is missing here
 
Сообщения
542
Реакции
50
Предупреждения
2
Помог
4 раз(а)
pmadisson75, doesn't matter. the lang file is identitic.
Код:
[ro]
ALREADY_HAVE = !g[%s]!y : Ai cerut deja scanarea acestui jucator !
MAKE_WCD = !g[%s]!y : Adminul !g[%s]!y cere o scanare WCD jucatorului !g[%s]!y. Data/Ora : !g%s
DOWNLOAD_LINK = !g[%s]!y : Link download !gwww.wargods.ro/wcd/download.php
INFO_WCD = !g[%s]!y : Daca nu stii sa faci aceasta scanare, scrie in chat !g/wcd!y sau !g/infowcd!y !
PLAYER_CLEAN = !g[%s]!y : Jucatorul !g[%s]!y este curat in urma scanari WCD !
INVALID_PLAYER =!g[%s]!y : Jucatorul specificat este inexistent !
 
[en]
ALREADY_HAVE = !g[%s]!y : You already requested a scan for this player !
MAKE_WCD = !g[%s]!y : Admin !g[%s]!y requests an WCD scan for player !g[%s]!y. Date/Time : !g%s
DOWNLOAD_LINK = !g[%s]!y : Download link !gwww.wargods.ro/wcd/download.php
INFO_WCD = !g[%s]!y : If you don't know how to do an WCD scan, type in chat !g/wcd!y or !g/infowcd!y !
PLAYER_CLEAN = !g[%s]!y : The player !g[%s]!y is clean after WCD scan !
INVALID_PLAYER =!g[%s]!y : The specified player is inexistent !
 
Сообщения
144
Реакции
29
pmadisson75 hi, i wrote some simple HTML, maybe you can try with it (although i dont know how exactly will player send proof from wargods to admins, but you will decide), it looks like this ingame:

html:
HTML:
<!DOCTYPE html>
<html>
<head>
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
</head>
<body>

<h1>WarGods Check</h1>
<p>Admin requested a check for cheats on you by Wargods site, <br>Download link:</p>
<h1>www.wargods.ro/wcd/download.php</h1>
<p>After scanning your files, you will see the results with URL
<br>Send your link to admin(s) when it is finished!<br><br>PS: Don't leave server because you will be automatically banned!</p>
</body>
</html>
dasdasdsaa.jpegdasdasdsaa.jpeg
 
Сообщения
542
Реакции
50
Предупреждения
2
Помог
4 раз(а)
HTML:
<!DOCTYPE html>
<html>
<head>
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
</head>
<body>

<h1>WarGods Check</h1>
<p>Администратор запросил проверку на наличие читов на сайте Wargods, <br>Ссылка для скачивания:</p>
<h1>www.wargods.ro/wcd/download.php</h1>
<p>После сканирования ваших файлов вы увидите результаты с ссылкой.
<br>По завершении отправьте ссылку администратору(ам)!<br><br>PS: Не покидайте сервер, потому что вы будете автоматически забанены!</p>
</body>
</html>
перевод на русский
 
Сообщения
322
Реакции
6
Помог
1 раз(а)
/scan

[WarGods] : The specified player is inexistent !
[WarGods] :There is more than one client matching your argument
How can I request to scan anyone I want?
 
Сообщения
5
Реакции
0
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Народ пожалуйста скиньте архив с плагином мне очень нужно по той ссылке скачать не могу
 
Сообщения
5
Реакции
0
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
спс
 
Сообщения
104
Реакции
23
Помог
2 раз(а)
bizon, у меня почему-то не банит, если выходит игрок. Звук звучит, а бана в бан-листе нет.
 
Сообщения
494
Реакции
340
Помог
11 раз(а)
veres, какая бан-система? Что после момента бана в логах? Бан желательно опробовать на себе и посмотреть в свою консоль, результат сюда.
Возможно, не совсем корректно слать команду бана в дисконнекте для используемой тобою бан-системы, так как я не знаю, как она обрабатывает команду бана (игрока в дисконнекте может попросту не учитывать).
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу