Help Сервер падает из за плагина разминки(но это не точно)

ZOOXEL

Пользователь
Регистрация
13 Июл 2017
Сообщения
29
Симпатии
2
Пол
Мужской
Решил обновить(раньше был 3.0.0.410-dev) все что только можно, все завелось сразу и без проблем, но как только подключиться игрок и выберет команду сервер падает, путем не хитрых манипуляций выяснилось что виновник плагин разминки(там кое что менял, но на старом все работало как часики).
Собственно вопрос, может кто глазастый углядит что то.. хз что и думать.
И еще может у кого есть подобный плагин на re api(Сам чет не разберусь)
Код:
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.0.0.585-dev
Build date: 10:45:03 Jul 25 2017 (1200)
Код:
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.75   ini   Start Never
 [ 2] ReAuthCheck      RUN   -    reauthcheck_mm_i  v0.1.6    ini   Start Never
 [ 3] Rechecker        RUN   -    rechecker_mm_i38  v2.3      ini   Chlvl ANY
 [ 4] hackdetector     RUN   -    hackdetector_amx  v0.15.32  ini   ANY   ANY
 [ 5] VoiceTranscoder  RUN   -    VoiceTranscoder.  v2017RC3  ini   ANY   ANY
 [ 6] ReSRDetector     RUN   -    resrdetector_mm_  v0.1.0    ini   Chlvl ANY
 [ 7] AMX Mod X        RUN   -    amxmodx_mm_i386.  v1.8.3-R  ini   Start ANY
 [ 8] ReSemiclip       RUN   -    resemiclip_mm_i3  v2.3.9    ini   Chlvl ANY
 [ 9] WHBlocker        RUN   -    whblocker_mm_i38  v1.5.692  ini   Chlvl ANY
 [10] ReAimDetector    RUN   -    reaimdetector_am  v0.1.7    pl7   ANY   Never
 [11] ReAPI            RUN   -    reapi_amxx_i386.  v5.1.0.1  pl7   ANY   Never
 [12] MySQL            RUN   -    mysql_amxx_i386.  v1.8.3-R  pl7   ANY   ANY
 [13] FakeMeta         RUN   -    fakemeta_amxx_i3  v1.8.3-R  pl7   ANY   ANY
 [14] Engine           RUN   -    engine_amxx_i386  v1.8.3-R  pl7   ANY   ANY
 [15] Ham Sandwich     RUN   -    hamsandwich_amxx  v1.8.3-R  pl7   ANY   ANY
 [16] CStrike          RUN   -    cstrike_amxx_i38  v1.8.3-R  pl7   ANY   ANY
Код:
 [  1] ReAimDetector API       0.1.8       ReHLDS Team       reaimdetector.a  running
 [  2] Aliases checker         0.8.2       kanagava          alias_detector.  running
 [  3] Admin Loader            2.9         neygomon          admin_loader.am  running
 [  4] Lite Bans               1.3         neugomon          lite_bans.amxx   running
 [  5] ScreenMaker             1.1         neygomon          screen_maker.am  running
 [  6] Menus Front-End         1.5         neugomon          menufront_end.a  running
 [  7] Advanced Gag            1.7.0       neygomon          amx_gag.amxx     running
 [  8] AdminSlot Reserv        1.0         neugomon          adminslot_reser  running
 [  9] Players Menu            1.7         neugomon          players_menu.am  running
 [ 10] Maps Menu               1.4.1       neugomon          mapsmenu.amxx    running
 [ 11] Block Advert            1.4         neygomon          block_advert.am  running
 [ 12] Pause Plugins           1.8.3-Re    AMXX Dev Team     pausecfg.amxx    running
 [ 13] Players MySQL Stats     1.2         neugomon          players_mysql_s  running
 [ 14] Weapon Restrict         1.7         s1lent            weapon_rest.amx  running
 [ 15] Advanced MapChooser     1.1.0       neygomon          map_chooser.amx  running
 [ 16] Lite Recoder            1.0.1       neygomon          amx_demorec_3.a  running
 [ 17] Ping Control            1.31        neygomon          Ping_Control.am  running
 [ 18] AFK Control             1.4.1 [Rnd  neygomon          afk_control.amx  running
 [ 19] Block grande info       1.0         neygomon          BlockGrenadeInf  running
 [ 20] Parachute               1.1         maeStro | neygom  parachute.amxx   running
 [ 21] AWPoff                  1.2         PAffAEJIkA :3     awp_off.amxx     running
 [ 22] [ReAPI] Round Balancer  1.1         neygomon          round_balancer.  running
 [ 23] Show Damage             1.0         neygomon          dmg.amxx         running
 [ 24] Vip System              1.34b       neygomon & Hypa_  vip_system.amxx  running
 [ 25] Lite Admin ESP          1.0         neygomon          admin_esp.amxx   running
 [ 26] WarmUP Knife Round      1.7         neygomon          warmup_knife_ro  running
 [ 27] unknown                 unknown     unknown           del_weapont.amx  running
 [ 28] vk_dhud                 1.0         zooxel            dhud_vk.amxx     running
 [ 29] Dead Messages           1.1         maFFyoZZyk        deadmessages.am  running
 [ 30] FM ResetScore           0.1         neygomon          fm_rs.amxx       running
 [ 31] Knife Duel with Telepo  1.2         neygomon          knife_duel.amxx  running
 [ 32] GameName Changer        1.0         neugomon          gamename_change  running
 [ 33] Admin Damager for Spec  1.0         neugomon          admin_damager_f  running
 [ 34] C4 Timer on roundtime   0.3.3a      neygomon          c4timer.amxx     running
 [ 35] SF Warn Menu            0.1.4f      serfreeman1337    sf_admin_warns.  running
 [ 36] Mode 2x2                2.5re       s1lent            mode.amxx        running
 [ 37] Lite Translit           2.8         neygomon          lite_translit.a  running
PHP:
// *************************************************************************************//
// Плагин загружен с  www.neugomon.ru                                                   //
// Автор: Neygomon  [ https://neugomon.ru/members/1/ ]                                  //
// Официальная тема поддержки: https://neugomon.ru/threads/57/                          //
// При копировании материала ссылка на сайт www.neugomon.ru ОБЯЗАТЕЛЬНА!                //
// *************************************************************************************//

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#define RESTART_TIME 45
#define JOIN_PLAYERS    // Впускать в игру людей, которые зашли позже

new g_iWarmUP;
new HamHook:Ham_SpawnWarmup, HamHook:Ham_KilledWarmup, HamHook:Ham_TouchWeap;
static iTimeCounter;
public plugin_natives() register_native("is_round_warmup", "return_wp_value");
public return_wp_value() return g_iWarmUP; 

public plugin_init()
{
    register_plugin("WarmUP Knife Round", "1.7", "neygomon");
#if defined JOIN_PLAYERS 
    register_clcmd("menuselect", "JoinClassHook");
        register_clcmd("joinclass", "JoinClassHook");
#endif 
    register_event("HLTV", "eRoundStart", "a", "1=0", "2=0");
    register_event("TextMsg", "eGameCommencing", "a", "2=#Game_Commencing");
}
#if defined JOIN_PLAYERS
public JoinClassHook(id)
{
        if(!g_iWarmUP) return;
#define OFF_JOINEDSTATE     121
#define OFF_MENU         205
#define OFF_MENU_CHOOSEAPPEARANCE 3
#define OFF_STATE_PICKINGCLASS    4
        if(get_pdata_int(id, OFF_MENU) == OFF_MENU_CHOOSEAPPEARANCE && get_pdata_int(id, OFF_JOINEDSTATE) == OFF_STATE_PICKINGCLASS)
        set_task(2.0, "FirstSpawn", id);
}
public FirstSpawn(id) if(!is_user_alive(id)) ExecuteHamB(Ham_Spawn, id);
#endif
public eGameCommencing()
{
    g_iWarmUP = 2;
    if(!Ham_SpawnWarmup)
    {
        Ham_SpawnWarmup = RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", true);
        Ham_KilledWarmup= RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", true);
        Ham_TouchWeap    = RegisterHam(Ham_Touch, "weaponbox", "fwdTouchWeaponPre", false);
    } 
    else
    {
        EnableHamForward(Ham_SpawnWarmup);
        EnableHamForward(Ham_KilledWarmup);
        EnableHamForward(Ham_TouchWeap);
    }
} 

public eRoundStart()
{
    switch(g_iWarmUP)
    {
        case 2:
        {
            ShowHUD();
            set_task(5.0, "ShowHUD", 786467, _, _, "b");
            TimeCount();
            set_task(1.0, "TimeCount", 656545, _, _, "b", RESTART_TIME);
            g_iWarmUP = 3;
        }
        case 3:
        {
            server_cmd("sv_restart 1");
            remove_task(786467);
            remove_task(656545);
            g_iWarmUP = 4;
            iTimeCounter = 0;
            DisableHamForward(Ham_SpawnWarmup);
            DisableHamForward(Ham_KilledWarmup);
            DisableHamForward(Ham_TouchWeap);
        }
        case 4:
        {
        set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.65, 2, 6.0, 3.0, 0.1, 1.5);
        show_dhudmessage(0, "Игра началась! Вперёд бойцы");
        g_iWarmUP = 0;
        client_cmd(0, "spk radio/letsgo");
        }
    } 
}

public TimeCount()
{
    set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 0.0, 1.0, 0.0, 0.0);
    if( g_iWarmUP == 2 )
    {
    show_dhudmessage(0, "До конца разминки %d сек...", RESTART_TIME - iTimeCounter++);
    }
    if(iTimeCounter >= RESTART_TIME)
    {
    server_cmd("sv_restart 1");
    remove_task(786467);
    remove_task(656545);
    DisableHamForward(Ham_SpawnWarmup);
    DisableHamForward(Ham_KilledWarmup);
    DisableHamForward(Ham_TouchWeap);
    iTimeCounter = 0;
    g_iWarmUP = 4;
    }
}

public fwdPlayerSpawnPost(pClient)
{
    if(!is_user_alive(pClient)) return;
  
    switch(get_user_team(pClient))
    {
        case 1: fm_strip_user_gun(pClient, "weapon_glock18");
        case 2: fm_strip_user_gun(pClient, "weapon_usp");
    }
    set_pev(pClient, pev_health, 35.0);
    set_pdata_int(pClient, 115, 0);
    HideMoney(pClient);
}

public fwdPlayerKilledPost(pVictim)
    set_task(1.0, "SpawnUser", pVictim);

public fwdTouchWeaponPre(id, ent)
    return HAM_SUPERCEDE;
  
public SpawnUser(pClient)
{
    if(!is_user_connected(pClient)) return;
    switch(get_user_team(pClient))
    {
        case 1, 2: ExecuteHamB(Ham_CS_RoundRespawn, pClient);
    }
}

public ShowHUD()
{
    set_dhudmessage(random(255), random(255), random(255), -1.0, 0.20, 1, 0.4, 5.0, 0.0, 0.0);
    show_dhudmessage(0, "Внимание, разминочный раунд!^nРежим: Knife DeathMatch");
}

HideMoney(id)
{
    static mHideWeapon; if(!mHideWeapon) mHideWeapon = get_user_msgid("HideWeapon");
    message_begin(MSG_ONE, mHideWeapon, .player = id);
    write_byte((1<<5));
    message_end(); 
}

stock fm_strip_user_gun(index, const wname[])
{
    new ent = -1;
    while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", wname)) && pev(ent, pev_owner) != index) {}
    if(!ent) return 0;
    engclient_cmd(index, "drop", wname);
    new ent_box = pev(ent, pev_owner);
    if(!ent_box || ent_box == index) return 0;
    dllfunc(DLLFunc_Think, ent_box);
    return 1;
}
Код:
amxx version
AMX Mod X 1.8.3-Re (http://www.amxmodx.org)
Authors:
    David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
    Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
    Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
    Borja "faluco" Ferrer, Scott "DS" Ehlert

Authors (ReHLDS Team):
     "Adidasman", "s1lent"
Compiled: Dec 24 2016 15:59:38
Build ID: 7
Core mode: JIT + ASM32
И еще плагины с нативами
PHP:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 183
    #include <colorchat>
#endif   

// #### Конфигурационные defines ####
#define VIP_ACCESS ADMIN_LEVEL_H            // Флаг доступа VIP (по дефолту флаг "t" ADMIN_LEVEL_H)
#define CHATTAG "^1[^4FreeDomVip^1]^4"         // Префикс перед сообщениями || ^1 - желтый ^3 - цвет команды ^4 - зеленый
#define VIPROUND 3                            // C какого раунда можно открыть вип меню
#define AWPM249RND 6                        // С какого раунда доступны AWP и пулемет

//#define AUTOVIPMENU                            // Автоматически открывать в начале рануда Вип меню (выключено по дефолту)
#define VIPAUTODEAGLE                        // В начале каждого раунда давать Дигл
#define VIPAUTOGRENADE                        // Давать в начале каждого раунда гранаты
#define VIPTAB                                // Показывать статус VIP в таблице на tab

#define SECOND        1.0                        // Время показа сообщения после коннекта

#define ADMIN_LOADER                        // Выводить срок до конца админки с Admin Loader by Neugomon
#if defined ADMIN_LOADER
    native admin_expired(index);
#endif
// #### Конфигурационные defines ####

#define is_user_vip(%0) (get_user_flags(%0) & VIP_ACCESS)
native is_round_warmup();
new g_roundCount;

new bool:iUseWeapon[33], bool:bDefuse, bool:g_iBlockBonus;

new const PRIMARY_WEAPONS_BITSUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
new const SECONDARY_WEAPONS_BITSUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

new bool:iUserVip[33];

public plugin_init()
{
    register_plugin("Vip System", "1.34b", "neygomon & Hypa_[KZ]");
    
    register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w");
    register_event("HLTV", "eRoundStart","a","1=0","2=0");

    #if defined VIPTAB
    if(!engfunc(EngFunc_FindEntityByString,FM_NULLENT,"classname","func_vip_safetyzone"))
        register_message(get_user_msgid("ScoreAttrib"),"MessageScoreAttrib");
    #endif
    if(engfunc(EngFunc_FindEntityByString,FM_NULLENT,"classname","func_bomb_target"))
        bDefuse = true;
        
    RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1);
    
    register_clcmd("say /vipmenu", "CmdMenu");
    register_clcmd("vipmenu", "CmdMenu");
    register_clcmd("say", "hook_say");
    register_clcmd("say_team", "hook_say");
    
    register_menucmd(register_menuid("Vip Menu"), MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5, "handler");
    
    new iMap_Name[32], iMap_Prefix[][] = { "" };
    get_mapname(iMap_Name, charsmax(iMap_Name))
    for(new i; i < sizeof iMap_Prefix; i++)
    {
        if(containi(iMap_Name, iMap_Prefix[i]) != -1)
            g_iBlockBonus = true
    }
}   

public client_putinserver(id)
    set_task(SECOND, "ConnectMessage", id);

public ConnectMessage(id)
{
    static name[32]; get_user_name(id, name, charsmax(name));
    
    if(get_user_flags(id) & ADMIN_RCON){
        client_print_color(0, 0, "%s ^3Главный Админ ^4%s ^1зашёл на сервер!", CHATTAG, name);
    } else if(get_user_flags(id) & ADMIN_BAN){
        client_print_color(0, 0, "%s ^3Администратор ^4%s ^1зашёл на сервер!", CHATTAG, name);
    } else if(get_user_flags(id) & VIP_ACCESS){
        client_print_color(0, 0, "%s ^3VIP-клиент ^4%s ^1зашёл на сервер!", CHATTAG, name);
    }
}
    
public eRestart()
    g_roundCount = 0;

public eRoundStart()
{
    g_roundCount++;
    
    arrayset(iUseWeapon, false, 33);
}

public Player_Spawn(id)
{
    if(g_iBlockBonus || !is_user_alive(id)) return 0;
    if(is_round_warmup()) return 0;
    if(is_user_vip(id)) iUserVip[id] = true;
    else return iUserVip[id] = false;
    
    #if defined VIPAUTOGRENADE
    fm_give_item(id, "weapon_hegrenade");
    fm_give_item(id, "weapon_flashbang");
    fm_give_item(id, "weapon_smokegrenade");
    cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
    #endif
    #if defined VIPAUTODEAGLE
    give_item_ex(id,"weapon_deagle",35,1)
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    #endif
    cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
    if(bDefuse && cs_get_user_team(id) == CS_TEAM_CT) cs_set_user_defuse(id, 1);
        
    #if defined AUTOVIPMENU
    return CmdMenu(id);
    #else
    return 0;
    #endif
}

public hook_say(id)
{
    static szMsg[128]; read_args(szMsg, 127); remove_quotes(szMsg);

    if(szMsg[0] != '/') return 0;

    static const szChoosedWP[][] = { "/ak47", "/m4a1", "/famas", "/awp", "/b51" };
    for(new a; a < sizeof szChoosedWP; a++)
    {
        if(!strcmp(szMsg, szChoosedWP[a]))
        {
            if(!is_allow_use(id)) break;
            if(a > 2 && g_roundCount < AWPM249RND)
                return client_print_color(id, 0, "%s Данное оружие доступно только с^3 %d ^4раунда!", CHATTAG, AWPM249RND);
            return handler(id, a);
        }
    }
    return 0;
}   

public CmdMenu(id)
{
    new iMap_Name[32];
    get_mapname(iMap_Name, charsmax(iMap_Name))
    if(!g_iBlockBonus)
    {
        MenuOpen(id);
    } else client_print_color(id, 0, "%s Вип меню ^3недоступен^4 на карте: ^3%s", CHATTAG, iMap_Name);
}

public MenuOpen(id)
{
    if(!is_allow_use(id)) return 0;
    
    static szMenu[512], iLen, iKey;

    iKey = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;
    
#if defined ADMIN_LOADER
    new exp = admin_expired(id);
    if(exp > 0)
    {
        new systime = get_systime();
        if(exp - systime > 0)
        {
            if((exp - systime) / 86400 > 0)
                iLen = formatex(szMenu, charsmax(szMenu), "\d[\rVip System\d] \yМеню V.I.P-клиента^n\wОсталось: \r%d \wдней^n^n\r1. \yВзять \d[\rAK47\d]^n\r2. \yВзять \d[\rM4A1\d]^n\r3. \yВзять \d[\rFAMAS\d]^n", ((exp - systime) / 86400));
            else    iLen = formatex(szMenu, charsmax(szMenu), "\d[\rVip System\d] \yМеню V.I.P-клиента^n\wОсталось: \rПоследний \wдень^n^n\r1. \yВзять \d[\rAK47\d]^n\r2. \yВзять \d[\rM4A1\d]^n\r3. \yВзять \d[\rFAMAS\d]^n");
        }
    }
    else if(exp == 0)    iLen = formatex(szMenu, charsmax(szMenu), "\d[\rVip System\d] \yМеню V.I.P-клиента^n\wОсталось: \yне ограничено^n^n\r1. \yВзять \d[\rAK47\d]^n\r2. \yВзять \d[\rM4A1\d]^n\r3. \yВзять \d[\rFAMAS\d]^n");
#else
    iLen = formatex(szMenu, charsmax(szMenu), "\d[\rVip System\d] \yМеню V.I.P-клиента^n\wВыберите действие^n^n\r1. \yВзять \d[\rAK47\d]^n\r2. \yВзять \d[\rM4A1\d]^n\r3. \yВзять \d[\rFAMAS\d]^n");
#endif
    
    if(g_roundCount < AWPM249RND)
        iLen += formatex(szMenu[iLen], 511 - iLen, "\r4. \yВзять \d[\rAWP\d] [c %d раунда]^n\r5. \yВзять \d[\rПулемет\d] [c %d раунда]^n^n", AWPM249RND, AWPM249RND);
    else
    {
        iKey |= MENU_KEY_4|MENU_KEY_5;
        iLen += formatex(szMenu[iLen], 511 - iLen, "\r4. \yВзять \d[\rAWP\d]^n\r5. \yВзять \d[\rПулемет\d]^n^n");
    }
    formatex(szMenu[iLen], 511 - iLen, "\r0. Выход");
    set_pdata_int(id, 205, 0);
    return show_menu(id, iKey, szMenu, -1, "Vip Menu");
}

public handler(id, iKey)
{
    if(iKey > 4 || iUseWeapon[id]) return 0;
    
    static const szChoosedBP[] = { 90, 90, 90, 30, 250 };
    static const szChoosedWP[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_awp", "weapon_m249" };

    iUseWeapon[id] = true;

    return give_item_ex(id, szChoosedWP[iKey], szChoosedBP[iKey], 1);
}

stock give_item_ex(id,currWeaponName[],ammoAmount,dropFlag=0)
{
    static    weaponsList[32], weaponName[32], weaponsNum, currWeaponID;       
    currWeaponID = get_weaponid(currWeaponName);
    if(dropFlag)
    {   
        weaponsNum = 0;
        get_user_weapons(id,weaponsList,weaponsNum);
        for (new i;i < weaponsNum;i++)
        {
            if(((1 << currWeaponID) & PRIMARY_WEAPONS_BITSUM && (1 << weaponsList[i]) & PRIMARY_WEAPONS_BITSUM) | ((1 << currWeaponID) & SECONDARY_WEAPONS_BITSUM && (1 << weaponsList[i]) & SECONDARY_WEAPONS_BITSUM))
            {
                get_weaponname(weaponsList[i],weaponName,charsmax(weaponName));
                engclient_cmd(id,"drop",weaponName);
            }
        }
    }
    fm_give_item(id,currWeaponName);
    cs_set_user_bpammo(id,currWeaponID,ammoAmount);
    return 1;
}

bool:is_allow_use(id)
{
    if(!iUserVip[id])
    {
        client_print_color(id, 0, "%s ^3Только VIP-игрок ^4может пользоваться этой командой!", CHATTAG);
        return false;
    }
    if(!is_user_alive(id))
    {
        client_print_color(id, 0, "%s Для использования данной команды вы должны быть ^3живы^4!", CHATTAG);
        return false;
    }
    if(!g_roundCount)
    {
        client_print_color(id, 0, "%s Разминочный раунд. ^3Запрещено ^4пользоваться командой!", CHATTAG);
        return false;
    }
    if(iUseWeapon[id])
    {
        client_print_color(id, 0, "%s Вы ^3уже брали ^4оружие в этом раунде!", CHATTAG);
        return false;
    }
    if(g_roundCount < VIPROUND)
    {
        client_print_color(id, 0, "%s Вип меню ^3недоступен^4! Ждите: ^3%d ^4раунда!", CHATTAG, VIPROUND - g_roundCount);
        return false;
    }
    return true;
}

#if defined VIPTAB
public MessageScoreAttrib(iMsgId, iDest, iReceiver)
{
    if(is_user_vip(get_msg_arg_int(1)) && !get_msg_arg_int(2))
        set_msg_arg_int(2, ARG_BYTE, 4);
}
#endif
Код:
#include <amxmodx>
#include <reapi>

native is_round_warmup();
public plugin_init()
    RegisterHookChain(RG_CBasePlayer_HasRestrictItem, "CBasePlayer_HasRestrictItem_Pre", false);
  
public CBasePlayer_HasRestrictItem_Pre(const id, const ItemID:item, ItemRestType:type)
{   
    if(!is_round_warmup()) return 0;
    if(type == ITEM_TYPE_TOUCHED)
    {
        SetHookChainReturn(ATYPE_INTEGER, true);
        return HC_SUPERCEDE;
    }
    return HC_CONTINUE;
}
PHP:
#include <amxmodx>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif   

#define PLUGIN    "Dead Messages"
#define VERSION    "1.1"
#define AUTHOR    "maFFyoZZyk"

new deadmsg;
native is_round_warmup();
new const g_szSounds[][] =
{
    "deadmsg/kaban4eg.wav"
}

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR)
    register_event("DeathMsg","event_DeathMsg","a")
    deadmsg = register_cvar( "deadmsg", "0" )
    
    new iMap_Name[32], iMap_Prefix[][] = { "35hp", "he_" };
    get_mapname(iMap_Name, charsmax(iMap_Name))
    for(new i; i < sizeof iMap_Prefix; i++)
    {
        if(containi(iMap_Name, iMap_Prefix[i]) != -1)
            pause("ad")
    }
}

public plugin_precache()
{
    for(new i = 0; i < sizeof(g_szSounds); i++)
        precache_sound(g_szSounds[i])
}

public event_DeathMsg()
{
    new weapon[32]; read_data(4,weapon,charsmax(weapon))
    if(strcmp(weapon,"knife") == 0)
    {
        switch( get_pcvar_num ( deadmsg ))
        {
            case 1:
            {
                new name[32]
                get_user_name(read_data(1), name, 31)
                client_print_color(0, -2,"^1[^4Свинорез^1] Игрок [^4%s^1] зарезал кабанчика и стал ^3свинорезом", name)
            }
            case 2:
            {
                set_hudmessage(random_num(1,255),random_num(1,255),random_num(1,255),0.10,0.30,0,3.0,6.0,0.1,0.2,4)
                show_hudmessage(0, "Ну вот, достойная смерть для свиньи.")
            }
        }
        if(is_round_warmup()){
        }
        else{
        client_cmd(0,"spk sound/deadmsg/kaban4eg.wav")
        }
    }
}
Кстати версия(оригинальная без изменений WarmUP Knife Round 1.7 neygomon тоже ложит сервер(предварительно отключал плагины с нативами)
 
Последнее редактирование:
Сверху Снизу