[ReAPI] Snow WarmUp (зимняя разминка)

[ReAPI] Snow WarmUp (зимняя разминка) 0.4

Нет прав для скачивания
Сообщения
1,060
Реакции
216
Предупреждения
9
Помог
6 раз(а)
Код:
@CSGameRules_RestartRound_Pre()
{
    if(bIsSnowWarmUp)
    {
        DisableHookChain(g_iHook[HC_RESTART_ROUND]);
        DisableHookChain(g_iHook[HC_PLAYER_SPAWN]);
        DisableHookChain(g_iHook[HC_PLAYER_KILLED]);
        DisableHookChain(g_iHook[HC_PLAYER_DUCK]);

        if(g_eCvar[CVAR_SWU_MEGA_THROW_COUNT])
            DisableHookChain(g_iHook[HC_PLAYER_PRETHINK]);

        DisableHookChain(g_iHook[HC_CAN_HAVE_PLAYER_ITEM]);
        DisableHookChain(g_iHook[HC_THROW_SMOKE_GRENADE]);
        DisableHookChain(g_iHook[HC_WEAPON_DEFAULT_DEPLOY]);
        DisableHookChain(g_iHook[HC_PLAYER_RADIO]);

+        new iEnt = NULLENT;

+        while((iEnt = rg_find_ent_by_class(iEnt, "snowball"))){
+             if(!is_nullent(iEnt)){
+                 rg_remove_entity(iEnt);
+            }
+        }

        set_cvar_num("mp_round_infinite", g_iCvarRoundInfinite);
        set_cvar_num("mp_forcerespawn", g_iCvarForseRespawn);

        set_member_game(m_bCTCantBuy, g_member_bCTCantBuy);
        set_member_game(m_bTCantBuy, g_member_bTCantBuy);

        if(g_eCvar[CVAR_SWU_AMBIENT_SOUND][0] != EOS)
            client_cmd(0, "stopsound");

        new
            pBestPlayer,
            iMax,
            iArraySize,
            sData[64],
            iStartMoney;

        iStartMoney = get_cvar_num("mp_startmoney");

        for(new pPlayer = 1; pPlayer <= MaxClients; pPlayer++)
        {
            if(!is_user_connected(pPlayer))
                continue;

            set_msg_weaponlist(pPlayer, "weapon_smokegrenade", 13, 1, -1, -1, 3, 3, WEAPON_SMOKEGRENADE, (ITEM_FLAG_LIMITINWORLD|ITEM_FLAG_EXHAUSTIBLE));
    
            if(g_iKillsCount[pPlayer] > iMax)
            {
                pBestPlayer = pPlayer;
                iMax = g_iKillsCount[pPlayer];
            }

            rg_add_account(pPlayer, iStartMoney, AS_SET);
        }

        set_task(0.5, "@func_give_award", pBestPlayer + TASK_AWARD_DELAY);

        iArraySize = ArraySize(any: g_aStateInfo[STATE_PLUGINS_ON]);
        for(new i; i < iArraySize; i++)
        {
            ArrayGetString(any: g_aStateInfo[STATE_PLUGINS_ON], i, sData, charsmax(sData));
            unpause("ac", sData);
        }

        iArraySize = ArraySize(any: g_aStateInfo[STATE_CVARS_SET]);
        for(new i; i < iArraySize; i++)
        {
            ArrayGetString(any: g_aStateInfo[STATE_CVARS_SET], i, sData, charsmax(sData));
            server_cmd("%s", sData);
            
        }
        server_exec();

    }else{
        g_iTimer = g_eCvar[CVAR_SWU_TIME];
        set_task(1.0, "@func_hud_info", 0xC0DE, .flags = "b");

        new
            iFwd,
            iArraySize,
            sData[64];

        iFwd = CreateMultiForward("swu_start", ET_CONTINUE);
        ExecuteForward(iFwd);

        iArraySize = ArraySize(any: g_aStateInfo[STATE_PLUGINS_OFF]);
        for(new i; i < iArraySize; i++)
        {
            ArrayGetString(any: g_aStateInfo[STATE_PLUGINS_OFF], i, sData, charsmax(sData));
            pause("ac", sData);
        }

        iArraySize = ArraySize(any: g_aStateInfo[STATE_CVARS_UNSET]);
        for(new i; i < iArraySize; i++)
        {
            ArrayGetString(any: g_aStateInfo[STATE_CVARS_UNSET], i, sData, charsmax(sData));
            server_cmd("%s", sData);
        }
        server_exec();
    }

    bIsSnowWarmUp = true;
}
 

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

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