Wargods plugin

Fedingas

Пользователь
Регистрация
12 Сен 2017
Сообщения
3
Симпатии
0
Здравствуйте, у меня проблема, плагин Wargods не банит оффлайн игроков. Ошибок в винде нет, только через Putty пишет:

Putty server console
Код:
Dropped Fedingas from server
Reason:  Client sent 'drop'
[FB] USE: fb_ban <time> <#userid> <reason>
И нет запрета

Как это исправить?


48. server_cmd("fb_ban %i %s %s", get_pcvar_num(cvars[2]), sName, REASON_BAN)

Wargods.sma:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
 
#define PLUGIN "Wargods"
#define VERSION "1.1.3"
#define AUTHOR "Dann"
//Meniu adaugat de LeviN
 
#define TAG "WarGods"
 
#define MOTD_LOCATION "addons/amxmodx/configs/wargods.html"
 
new const REASON_BAN[] = "Refuz scanare WCD";
 
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("wargods.txt")
}
 
public client_connect(id)
{
    hascan[id] = false
}
 
public client_disconnected(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("fb_ban %i %s %s", get_pcvar_num(cvars[2]), sName, 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]))
        {
            static players[32],num,nick[33],target,tid[32],menu
            get_players(players, num, "ch")
            menu=menu_create("Wargods Scan Menu", "_skano_pmh")
            for(new i;i<num;i++)
            {
                target=players[i]
                get_user_name(target, nick, charsmax(nick))
                formatex(tid, charsmax(tid), "%d", get_user_userid(target))
                menu_additem(menu, nick, tid)
            }
            menu_display(id, menu)
        }
    }
    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, "/wg") || equal(szSaid, "/wargods"))
    {
        show_motd(id, MOTD_LOCATION)
    }
 
    return PLUGIN_CONTINUE
}
public _skano_pmh(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
 
    static szData[6], szName[64], _access, item_callback, tid, target
    menu_item_getinfo(menu, item, _access, szData, charsmax(szData), szName, charsmax(szName), item_callback)
 
    tid = str_to_num(szData)
 
    target = find_player("k", tid)
 
    if(target)
    {
        if(hascan[target])
        {
            ColorChat(id, "%L", LANG_SERVER, "ALREADY_HAVE", TAG)
            return PLUGIN_HANDLED
        }
        else
        {
            static pname[33], admin[33],timer[25]
            get_user_name(target, pname, charsmax(pname))
            get_user_name(id, admin, charsmax(admin))
            get_time("%d/%m/%Y - %H:%M:%S", timer, charsmax(timer))
            hascan[target] = true
            store_team = get_user_team(target)
            user_silentkill(target)
            cs_set_user_team(target, 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")
        }
    }
    else
    {
        ColorChat(id, "%L", LANG_SERVER, "INVALID_PLAYER", TAG)
        return PLUGIN_HANDLED
    }
 
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
 
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
}
 
Сверху Снизу