Прикэш

Статус
В этой теме нельзя размещать новые ответы.

Анатолий

Заблокированные
Пользователь
Регистрация
8 Июн 2017
Сообщения
685
Симпатии
195
Пол
Мужской
ВКонтакте
e1337ace
Вопрос: Если радио команды отключены нужно убирать с прикэша звуки? или не стоит это делать?

Пример:
Код:
#include <amxmodx>
#include <fakemeta>

new const g_Sounds[][] =
{
    "radio/blow.wav", "radio/bombdef.wav",
    "radio/bombpl.wav", "radio/circleback.wav",
    "radio/clear.wav", "radio/com_followcom.wav",
    "radio/com_getinpos.wav", "radio/com_go.wav",
    "radio/com_reportin.wav", "radio/ct_affirm.wav",
    "radio/ct_backup.wav", "radio/ct_coverme.wav",
    "radio/ct_enemys.wav", "radio/ct_fireinhole.wav",
    "radio/ct_imhit.wav", "radio/ct_inpos.wav",
    "radio/ct_point.wav", "radio/ct_reportingin.wav",
    "radio/ctwin.wav", "radio/elim.wav",
    "radio/enemydown.wav", "radio/escaped.wav",
    "radio/fallback.wav", "radio/fireassis.wav",
    "radio/flankthem.wav", "radio/followme.wav",
    "radio/getout.wav", "radio/go.wav",
    "radio/hitassist.wav", "radio/hosdown.wav",
    "radio/letsgo.wav", "radio/locknload.wav",
    "radio/matedown.wav", "radio/meetme.wav",
    "radio/moveout.wav", "radio/negative.wav",
    "radio/position.wav", "radio/regroup.wav",
    "radio/rescued.wav", "radio/roger.wav",
    "radio/rounddraw.wav", "radio/sticktog.wav",
    "radio/stormfront.wav", "radio/takepoint.wav",
    "radio/terwin.wav", "radio/vip.wav"
}

public plugin_precache()
    register_forward(FM_PrecacheSound, "PrecacheSound")

public plugin_init()
{
    register_clcmd("radio1", "cmd_block"); register_clcmd("radio2", "cmd_block")
    register_clcmd("radio3", "cmd_block"); register_clcmd("coverme", "cmd_block")
    register_clcmd("takepoint", "cmd_block"); register_clcmd("holdpos", "cmd_block")
    register_clcmd("regroup", "cmd_block"); register_clcmd("followme", "cmd_block")
    register_clcmd("takingfire", "cmd_block"); register_clcmd("go", "cmd_block")
    register_clcmd("fallback", "cmd_block"); register_clcmd("sticktog", "cmd_block")
    register_clcmd("getinpos", "cmd_block"); register_clcmd("stormfront", "cmd_block")
    register_clcmd("report", "cmd_block"); register_clcmd("roger", "cmd_block")
    register_clcmd("enemyspot", "cmd_block"); register_clcmd("needbackup", "cmd_block")
    register_clcmd("sectorclear", "cmd_block"); register_clcmd("inposition", "cmd_block")
    register_clcmd("reportingin", "cmd_block"); register_clcmd("getout", "cmd_block")
    register_clcmd("negative", "cmd_block"); register_clcmd("enemydown", "cmd_block")
    set_msg_block(get_user_msgid("HudTextArgs"), BLOCK_SET)
}

public cmd_block(id) return PLUGIN_HANDLED

public PrecacheSound(const szSound[])
{
    for (new i = 0; i < sizeof(g_Sounds); i ++)
    {
        if (containi(szSound, g_Sounds[i]) != -1)
        {
            forward_return(FMV_CELL, 0)
            return FMRES_SUPERCEDE
        }
    }
    return FMRES_IGNORED
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу