Map_manager_Effects голосовой отсчет перед голосованием

Mers

Пользователь
Регистрация
9 Апр 2020
Сообщения
108
Симпатии
3
OS
Linux
Amx Mod X
AMXX 1.8.2
Билд
ReHLDS
Metamod
3.7.0.694-dev
Meta модули
Код:
[ 1] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386. v1.8.2-d ini Start ANY
[ 3] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 4] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 5] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 6] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 7] SoftBlocker RUN - softblocker_mm_i v1.1g ini ANY Never
[ 8] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 9] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[10] Engine RUN - engine_amxx_i386 v1.8.2-d pl2 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2-d pl2 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.8.2-d pl2 ANY ANY
[13] ReAimDetector RUN - reaimdetector_am v0.2.2 pl2 ANY Never
[14] MySQL RUN - mysql_amxx_i386. v1.8.2-d pl2 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386. v5.12.0. pl2 ANY Never
[16] CSX Extended RUN - csx_amxx_i386.so v1.5 pl2 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.8.2-d pl2 ANY ANY
[18] CStrike RUN - cstrike_amxx_i38 v1.8.2-d pl2 ANY ANY
Плагины
Код:
[ 1] FreshBans 1.3.8b kanagava fresh_bans.amxx running
[ 2] AMXBans: Core Gm 1.6 Larte Team amxbans_core.am running
[ 3] Anti Flood 1.8.2 AMXX Dev Team antiflood.amxx running
[ 4] [182] Fast Hack Detect 19.03.12 Valer4 fast_hack_detec running
[ 5] Anti Sound ESP 0.2.181 s3zy AntiSoundESP_82 running
[ 6] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 7] [182] Cvar On Map 19.12.07 SKAJIbnEJIb cvar_on_map.amx running
[ 8] Warm Up 2020 0.1.571 s3zy warmup2020.amxx debug
[ 9] [182] Ultimate Weapons 19.11.29 SKAJIbnEJIb ultimate_weapon running
[ 10] Gag Me 2.3.4 Radius gag_me.amxx running
[ 11] [182] CsStats MySQL 19.08.27 SKAJIbnEJIb csstats_mysql.a running
[ 12] [182] CsStats Editor 20.03.20 SKAJIbnEJIb csstats_editor. running
[ 13] [182] Skill ELO 19.09.06 SKAJIbnEJIb skill_elo.amxx running
[ 14] [182] StatsX RBS 19.08.28 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 15] Stats Configuration 1.8.2 AMXX Dev Team statscfg.amxx running
[ 16] Menus Front-End 18.12.18 AMXX Dev Team & amxmodmenu_rbs. running
[ 17] [182] AdminCmd RBS 20.03.20 SKAJIbnEJIb & AM admincmd_rbs.am running
[ 18] [182] VIP RBS 19.12.09 SKAJIbnEJIb vip_rbs.amxx running
[ 19] [182] CSDM Lite 19.11.02 SKAJIbnEJIb csdm_lite.amxx running
[ 20] [182] Army Ranks Ultim 19.11.29 SKAJIbnEJIb army_ranks_ulti running
[ 21] [182] C4 Real Timer 17.10.30 Sanlerus c4_realtimer.am running
[ 22] [182] Ultimate Informe 17.10.30 SKAJIbnEJIb ultimate_inform running
[ 23] [182] Damager RBS 19.08.30 SKAJIbnEJIb damager_rbs.amx running
[ 24] [182] No Team Flash 20.03.06 SKAJIbnEJIb NoTeamFlash.amx running
[ 25] [182] VoteBan L4D 17.10.30 Sanlerus voteban_l4d.amx running
[ 26] [182] RestMenu RBS 17.09.14 SKAJIbnEJIb & AM restmenu_rbs.am running
[ 27] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp running
[ 28] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 29] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 30] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 31] [182] Chat RBS 19.12.23 SKAJIbnEJIb chat_rbs.amxx running
[ 32] [182] MapsMenu RBS 19.09.01 SKAJIbnEJIb & AM mapsmenu_rbs.am running
[ 33] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 34] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 35] DHUD Deads ALL 1.3.1 M1 TEAM dhud_message_de running
[ 36] [ReAPI] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 37] [Reapi] Custom Models 1.6.1 neygomon custom_models.a running
[ 38] Reset Score 1.0 M1 TEAM ResetScore.amxx running
[ 39] Money 1.1 M1 TEAM money.amxx running
[ 40] Hud_Info+IP 2.0 DeIIyTaT Hud_Info.amxx running
[ 41] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
[ 42] Mute 1.0 Makenzo mute.amxx running
[ 43] [182] AC Spectator ESP 17.08.09 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 44] Advert Messages 1.22 neygomon adverts.amxx running
[ 45] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 46] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 47] Fake Ping 1.1 MeRcyLeZZ/gyxoBk fake_ping.amxx running
[ 48] HS Sound 1.0 M1 TEAM headshot.amxx running
[ 49] [ReAPI] Mode 2x2 2.5re M1 TEAM mode.amxx running
[ 50] [182] AR Bets 17.10.30 SKAJIbnEJIb ar_bets.amxx running
[ 51] [182] WallHack Viewer 20.03.06 SKAJIbnEJIb wallhack_viewer running
[ 52] [182] AC GasPuff 17.10.30 SKAJIbnEJIb ac_gaspuff.amxx running
[ 53] [182] SlayLosers RBS 19.09.02 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 54] [182] Demo Recorder RB 18.02.08 SKAJIbnEJIb demorecorder_rb running
[ 55] Nice Killer 1.6 Got Milk? / HoHo nice_killer.amx running
[ 56] Weapon Model + Sound R 1.2 GHW_Chronic GHW_Weapon_Repl running
[ 57] [182] Nick FIX RBS 17.08.20 SKAJIbnEJIb nickfix_rbs.amx running
[ 58] [182] Block Reconnect 17.08.09 ShaTalKiN Block_Reconnect running
[ 59] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 60] Admin Explode 1.0.0 tuty AdminExplode.am running
[ 61] [182] Blind RBS 20.03.21 SKAJIbnEJIb blind_rbs.amxx running
[ 62] [182] Ultimate Knife 19.11.12 SKAJIbnEJIb ultimate_knife. running
[ 63] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 64] Join_Music 1.0 Makenzo muz.amxx running
[ 65] [DD] Quick defuse 1.1 Deadly|Darkness dd_qdefuse.amxx running
[ 66] unknown unknown unknown vote.amxx running
[ 67] ReChecker Logging 1.0 custom rc_logging.amxx running
[ 68] Color Flash Screen 1.6.4 Radius (Stimul i color_flash_scr running
[ 69] Map Manager: Core 3.0.4 Mistrick map_manager_cor running
[ 70] Map Manager: Scheduler 0.1.4 Mistrick map_manager_sch running
[ 71] Map Manager: Nominatio 0.1.0 Mistrick map_manager_nom running
[ 72] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 73] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
Amxx Модули
Код:
# 1 Engine 1.8.2-dev AMX Mod X Dev running
# 2 FakeMeta 1.8.2-dev AMX Mod X Dev running
# 3 Sockets 1.8.2-dev HLSW Dev Team running
# 4 Sockets2 1.8.1.3746 HLSW Dev Team running
# 5 nVault 1.8.2-dev AMX Mod X Dev running
# 6 Ham Sandwich 1.8.2-dev AMX Mod X Dev running
# 7 ReAimDetector 0.2.2 ReHLDS Team running
# 8 MySQL 1.8.2-dev AMX Mod X Dev running
# 9 ReAPI 5.12.0.192-dev Asmodai & s1le running
# 10 RegEx 1.8.2-dev AMX Mod X Dev running
# 11 CSX Extended 1.5 AMX Mod X Dev running
# 12 Fun 1.8.2-dev AMX Mod X Dev running
# 13 CStrike 1.8.2-dev-fix AMX Mod X Dev running
Ошибка
Код:
логов нет
всем привет! залил свои звуки в формате wav по пути как указано в исходнике, но не проигрываются на сервере, и само собой не грузятся файлы wav при входе на сервер
 

d3m37r4

Скриптер
Постоялец
Регистрация
8 Июн 2017
Сообщения
741
Симпатии
393
Пол
Мужской
Telegram
@dmitry_isakow
Mers, их прекешить нужно.
 

Mers

Пользователь
Регистрация
9 Апр 2020
Сообщения
108
Симпатии
3
Mers, их прекешить нужно.
прекешить? а это что такое и с чем его едят? я не совсем дуб-дубом, но с такой фигней сталкиваюсь впервые, юзаю исходники всего (или уже) 4ый месяц...
 

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
2.578
Симпатии
914
Пол
Женский
прекешить? а это что такое и с чем его едят? я не совсем дуб-дубом, но с такой фигней сталкиваюсь впервые, юзаю исходники всего (или уже) 4ый месяц...
Вбейте в гугл "предварительное кэширование"
 

CHEL74

Пользователь
Регистрация
26 Фев 2019
Сообщения
23
Симпатии
7
Пол
Мужской
Mers, собираете пути кастомных звуков в массив и циклом прекэшите:
Код:
public plugin_precache() {
    new const szSounds[][] = {
        "",
        "",
        "",
        "",
        ""
    }

    for(new i; i < sizeof(szSounds); i++) {
        precache_sound(szSounds[i])
    }
}
 

Mers

Пользователь
Регистрация
9 Апр 2020
Сообщения
108
Симпатии
3
Mers, собираете пути кастомных звуков в массив и циклом прекэшите:
Код:
public plugin_precache() {
    new const szSounds[][] = {
        "",
        "",
        "",
        "",
        ""
    }

    for(new i; i < sizeof(szSounds); i++) {
        precache_sound(szSounds[i])
    }
}
че то не прёт компиляция
error 001: expected token: ";", but found "for"
error 001: expected token: ";", but found "}"
 

CHEL74

Пользователь
Регистрация
26 Фев 2019
Сообщения
23
Симпатии
7
Пол
Мужской
Mers, в моём примере всё верно. Ошибка где-то у вас.
 

IIuToH

Только чтение
Заблокированные
Регистрация
5 Авг 2018
Сообщения
143
Симпатии
0
Предупреждения
260
CHEL74, то есть нужно убрать это
Код:
new const g_sSound[][] = {
    "sound/fvox/one.wav", "sound/fvox/two.wav", "sound/fvox/three.wav", "sound/fvox/four.wav", "sound/fvox/five.wav",
    "sound/fvox/six.wav", "sound/fvox/seven.wav", "sound/fvox/eight.wav", "sound/fvox/nine.wav", "sound/fvox/ten.wav"
};
и заменить на ваш?
 

CHEL74

Пользователь
Регистрация
26 Фев 2019
Сообщения
23
Симпатии
7
Пол
Мужской
IIuToH, нет. тут будет:
Код:
new const g_sSound[][] = {
    "sound/fvox/one.wav", "sound/fvox/two.wav", "sound/fvox/three.wav", "sound/fvox/four.wav", "sound/fvox/five.wav",
    "sound/fvox/six.wav", "sound/fvox/seven.wav", "sound/fvox/eight.wav", "sound/fvox/nine.wav", "sound/fvox/ten.wav"
}

public plugin_precache() {
    for(new i; i < sizeof(g_sSound); i++) {
        precache_sound(g_sSound[i])
    }
}
И так правильнее делать, если строки массива используются не только в функции, где он объявляется. А если делаются статичные строки внутри часто вызываемой функции, используется static const, чтобы каждый раз не объявлялось.
 

IIuToH

Только чтение
Заблокированные
Регистрация
5 Авг 2018
Сообщения
143
Симпатии
0
Предупреждения
260
CHEL74, при компиляции ошибки в этих строках
Код:
public plugin_precache() {
    for(new i; i < sizeof(g_sSound); i++) {
        precache_sound(g_sSound[i])
Код:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <map_manager>

#define PLUGIN "Map Manager: Effects"
#define VERSION "0.0.8"
#define AUTHOR "Mistrick"

#pragma semicolon 1

#define get_num(%0) get_pcvar_num(g_pCvars[%0])
#define set_num(%0,%1) set_pcvar_num(g_pCvars[%0],%1)
#define get_float(%0) get_pcvar_float(g_pCvars[%0])
#define set_float(%0,%1) set_pcvar_float(g_pCvars[%0],%1)

enum (+=100) {
    TASK_FULLBLACK = 100
};

enum Cvars {
    BLACK_SCREEN,
    BLOCK_CHAT,
    BLOCK_VOICE,
    FREEZE_IN_VOTE,
    VOICE_ENABLED,
    FREEZETIME,
    VOTE_IN_NEW_ROUND,
    PREPARE_TIME,
    VOTE_TIME,
    CHANGE_TYPE,
    LAST_ROUND
};

enum {
    FREEZE_DISABLED,
    FREEZE_TIME_ENABLED,
    FREEZE_FORCE_USE_FLAGS
};

new g_pCvars[Cvars];
new bool:g_bBlockChat;
new bool:g_bFreezetimeChanged;
new HamHook:g_hHamSpawn;

new const g_sSound[][] = {
    "sound/fvox/one.wav", "sound/fvox/two.wav", "sound/fvox/three.wav", "sound/fvox/four.wav", "sound/fvox/five.wav",
    "sound/fvox/six.wav", "sound/fvox/seven.wav", "sound/fvox/eight.wav", "sound/fvox/nine.wav", "sound/fvox/ten.wav"
}

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

new g_sCurMap[MAPNAME_LENGTH];

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

    g_pCvars[BLACK_SCREEN] = register_cvar("mapm_black_screen", "1"); // 0 - disable, 1 - enable
    g_pCvars[BLOCK_CHAT] = register_cvar("mapm_block_chat", "1"); // 0 - disable, 1 - enable
    g_pCvars[BLOCK_VOICE] = register_cvar("mapm_block_voice", "1"); // 0 - disable, 1 - enable
    g_pCvars[FREEZE_IN_VOTE] = register_cvar("mapm_freeze_in_vote", "1"); //0 - disable, 1 - enable, 2 - force use flags

    g_pCvars[VOICE_ENABLED] = get_cvar_pointer("sv_voiceenable");

    DisableHamForward(g_hHamSpawn = RegisterHam(Ham_Spawn, "player", "player_spawn_post", 1));
}
public plugin_cfg()
{
    get_mapname(g_sCurMap, charsmax(g_sCurMap));

    if(get_num(BLOCK_CHAT)) {
        register_clcmd("say", "clcmd_say");
        register_clcmd("say_team", "clcmd_say");
    }
    if(get_num(FREEZE_IN_VOTE)) {
        g_pCvars[FREEZETIME] = get_cvar_pointer("mp_freezetime");
        g_pCvars[VOTE_IN_NEW_ROUND] = get_cvar_pointer("mapm_vote_in_new_round");
        g_pCvars[PREPARE_TIME] = get_cvar_pointer("mapm_prepare_time");
        g_pCvars[VOTE_TIME] = get_cvar_pointer("mapm_vote_time");
        g_pCvars[CHANGE_TYPE] = get_cvar_pointer("mapm_change_type");
        g_pCvars[LAST_ROUND] = get_cvar_pointer("mapm_last_round");
    }
}
public plugin_end()
{
    if(g_bFreezetimeChanged) {
        set_float(FREEZETIME, get_float(FREEZETIME) - get_float(PREPARE_TIME) - get_float(VOTE_TIME) - 1);
    }
}
public clcmd_say(id)
{
    if(!g_bBlockChat) return PLUGIN_CONTINUE;

    new args[2]; read_args(args, charsmax(args));

    return (args[0] == '/') ? PLUGIN_HANDLED_MAIN : PLUGIN_HANDLED;
}
public player_spawn_post(id)
{
    if(get_num(FREEZE_IN_VOTE) == FREEZE_FORCE_USE_FLAGS || get_num(FREEZE_IN_VOTE) && !get_num(VOTE_IN_NEW_ROUND)) {
        set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN);
    }
    if(get_num(BLACK_SCREEN)) {
        set_black_screenfade(1);
    }
}
public mapm_countdown(type, time)
{
    if(type == COUNTDOWN_PREPARE) {
        // hud timer
        new players[32], pnum; get_players(players, pnum, "ch");
        set_hudmessage(50, 255, 50, -1.0, 0.3, 0, 0.0, 1.0, 0.0, 0.0, 4);
        for(new i, id; i < pnum; i++) {
            id = players[i];
            show_hudmessage(id, "%L %L!", id, "MAPM_HUD_TIMER", time, id, "MAPM_SECONDS");
        }
        // sound
        if( 0 < time <= 10 ) {
            send_audio(0, g_sSound[time - 1], PITCH_NORM);
        }
    }
}
public mapm_prepare_votelist(type)
{
    if(get_num(BLACK_SCREEN)) {
        set_black_screenfade(2);
        set_task(1.0, "set_full_black", TASK_FULLBLACK);
    }
    if(get_num(BLOCK_CHAT)) {
        g_bBlockChat = true;
    }
    if(get_num(BLOCK_VOICE)) {
        set_num(VOICE_ENABLED, 0);
    }
    if(get_num(FREEZE_IN_VOTE)) {
        if(get_num(FREEZE_IN_VOTE) == FREEZE_TIME_ENABLED
            && (type == VOTE_BY_SCHEDULER || type == VOTE_BY_RTV || type == VOTE_BY_CMD)
            && get_num(VOTE_IN_NEW_ROUND)) {
            // increase freezetime
            g_bFreezetimeChanged = true;
            set_float(FREEZETIME, get_float(FREEZETIME) + get_float(PREPARE_TIME) + get_float(VOTE_TIME) + 1);
        } else {
            freeze_unfreeze(0);
        }
    }
    EnableHamForward(g_hHamSpawn);
}
public mapm_vote_started(type)
{
    send_audio(0, "sound/Gman/Gman_Choose2.wav", PITCH_NORM);
}
public mapm_vote_finished(const map[], type, total_votes)
{
    disable_effects(map);
}
public mapm_vote_canceled(type)
{
    disable_effects("");
}
disable_effects(const map[])
{
    if(get_num(BLACK_SCREEN)) {
        remove_task(TASK_FULLBLACK);
        set_black_screenfade(0);
    }
    if(get_num(BLOCK_CHAT)) {
        g_bBlockChat = false;
    }
    if(get_num(BLOCK_VOICE)) {
        set_num(VOICE_ENABLED, 1);
    }
    if(get_num(FREEZE_IN_VOTE) != FREEZE_DISABLED) {
        if(g_bFreezetimeChanged) {
            // decrease freezetime
            g_bFreezetimeChanged = false;
            set_float(FREEZETIME, get_float(FREEZETIME) - get_float(PREPARE_TIME) - get_float(VOTE_TIME) - 1);
        }
        if(get_num(CHANGE_TYPE) || get_num(LAST_ROUND) || is_map_extended(map)) {
            freeze_unfreeze(1);
        }
    }
    DisableHamForward(g_hHamSpawn);
}
public set_full_black(taskid)
{
    set_black_screenfade(1);
}
stock freeze_unfreeze(type)
{
    new players[32], pnum; get_players(players, pnum, "a");
    for(new id, i; i < pnum; i++) {
        id = players[i];
        set_pev(id, pev_flags, type ? (pev(id, pev_flags) & ~FL_FROZEN) : pev(id, pev_flags) | FL_FROZEN);
    }
}
is_map_extended(const map[])
{
    return equali(map, g_sCurMap);
}
stock set_black_screenfade(fade)
{
    new time, hold, flags;
    static msg_screenfade; if(!msg_screenfade) msg_screenfade = get_user_msgid("ScreenFade");
    
    switch (fade) {
        case 1: { time = 1; hold = 1; flags = 4; }
        case 2: { time = 4096; hold = 1024; flags = 1; }
        default: { time = 4096; hold = 1024; flags = 2; }
    }

    message_begin(MSG_ALL, msg_screenfade);
    write_short(time);
    write_short(hold);
    write_short(flags);
    write_byte(0);
    write_byte(0);
    write_byte(0);
    write_byte(255);
    message_end();
}
 

CHEL74

Пользователь
Регистрация
26 Фев 2019
Сообщения
23
Симпатии
7
Пол
Мужской
прекэш по-моему один раз за карту вызывается
Я и не говорил, что несколько.
CHEL74, при компиляции ошибки в этих строках
Создавайте тему в проблемах с компиляцией. Опять же, у меня всё правильно. И судя по массиву, вы прекэшируете стандартные звуки игры, которые в этом не нуждаются.
 

cpCTRL

bruh
Скриптер
Постоялец
Регистрация
20 Фев 2018
Сообщения
263
Симпатии
65
Пол
Мужской
CHEL74, при компиляции ошибки в этих строках
Код:
public plugin_precache() {
    for(new i; i < sizeof(g_sSound); i++) {
        precache_sound(g_sSound[i])
Код:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <map_manager>

#define PLUGIN "Map Manager: Effects"
#define VERSION "0.0.8"
#define AUTHOR "Mistrick"

#pragma semicolon 1

#define get_num(%0) get_pcvar_num(g_pCvars[%0])
#define set_num(%0,%1) set_pcvar_num(g_pCvars[%0],%1)
#define get_float(%0) get_pcvar_float(g_pCvars[%0])
#define set_float(%0,%1) set_pcvar_float(g_pCvars[%0],%1)

enum (+=100) {
    TASK_FULLBLACK = 100
};

enum Cvars {
    BLACK_SCREEN,
    BLOCK_CHAT,
    BLOCK_VOICE,
    FREEZE_IN_VOTE,
    VOICE_ENABLED,
    FREEZETIME,
    VOTE_IN_NEW_ROUND,
    PREPARE_TIME,
    VOTE_TIME,
    CHANGE_TYPE,
    LAST_ROUND
};

enum {
    FREEZE_DISABLED,
    FREEZE_TIME_ENABLED,
    FREEZE_FORCE_USE_FLAGS
};

new g_pCvars[Cvars];
new bool:g_bBlockChat;
new bool:g_bFreezetimeChanged;
new HamHook:g_hHamSpawn;

new const g_sSound[][] = {
    "sound/fvox/one.wav", "sound/fvox/two.wav", "sound/fvox/three.wav", "sound/fvox/four.wav", "sound/fvox/five.wav",
    "sound/fvox/six.wav", "sound/fvox/seven.wav", "sound/fvox/eight.wav", "sound/fvox/nine.wav", "sound/fvox/ten.wav"
}

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

new g_sCurMap[MAPNAME_LENGTH];

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

    g_pCvars[BLACK_SCREEN] = register_cvar("mapm_black_screen", "1"); // 0 - disable, 1 - enable
    g_pCvars[BLOCK_CHAT] = register_cvar("mapm_block_chat", "1"); // 0 - disable, 1 - enable
    g_pCvars[BLOCK_VOICE] = register_cvar("mapm_block_voice", "1"); // 0 - disable, 1 - enable
    g_pCvars[FREEZE_IN_VOTE] = register_cvar("mapm_freeze_in_vote", "1"); //0 - disable, 1 - enable, 2 - force use flags

    g_pCvars[VOICE_ENABLED] = get_cvar_pointer("sv_voiceenable");

    DisableHamForward(g_hHamSpawn = RegisterHam(Ham_Spawn, "player", "player_spawn_post", 1));
}
public plugin_cfg()
{
    get_mapname(g_sCurMap, charsmax(g_sCurMap));

    if(get_num(BLOCK_CHAT)) {
        register_clcmd("say", "clcmd_say");
        register_clcmd("say_team", "clcmd_say");
    }
    if(get_num(FREEZE_IN_VOTE)) {
        g_pCvars[FREEZETIME] = get_cvar_pointer("mp_freezetime");
        g_pCvars[VOTE_IN_NEW_ROUND] = get_cvar_pointer("mapm_vote_in_new_round");
        g_pCvars[PREPARE_TIME] = get_cvar_pointer("mapm_prepare_time");
        g_pCvars[VOTE_TIME] = get_cvar_pointer("mapm_vote_time");
        g_pCvars[CHANGE_TYPE] = get_cvar_pointer("mapm_change_type");
        g_pCvars[LAST_ROUND] = get_cvar_pointer("mapm_last_round");
    }
}
public plugin_end()
{
    if(g_bFreezetimeChanged) {
        set_float(FREEZETIME, get_float(FREEZETIME) - get_float(PREPARE_TIME) - get_float(VOTE_TIME) - 1);
    }
}
public clcmd_say(id)
{
    if(!g_bBlockChat) return PLUGIN_CONTINUE;

    new args[2]; read_args(args, charsmax(args));

    return (args[0] == '/') ? PLUGIN_HANDLED_MAIN : PLUGIN_HANDLED;
}
public player_spawn_post(id)
{
    if(get_num(FREEZE_IN_VOTE) == FREEZE_FORCE_USE_FLAGS || get_num(FREEZE_IN_VOTE) && !get_num(VOTE_IN_NEW_ROUND)) {
        set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN);
    }
    if(get_num(BLACK_SCREEN)) {
        set_black_screenfade(1);
    }
}
public mapm_countdown(type, time)
{
    if(type == COUNTDOWN_PREPARE) {
        // hud timer
        new players[32], pnum; get_players(players, pnum, "ch");
        set_hudmessage(50, 255, 50, -1.0, 0.3, 0, 0.0, 1.0, 0.0, 0.0, 4);
        for(new i, id; i < pnum; i++) {
            id = players[i];
            show_hudmessage(id, "%L %L!", id, "MAPM_HUD_TIMER", time, id, "MAPM_SECONDS");
        }
        // sound
        if( 0 < time <= 10 ) {
            send_audio(0, g_sSound[time - 1], PITCH_NORM);
        }
    }
}
public mapm_prepare_votelist(type)
{
    if(get_num(BLACK_SCREEN)) {
        set_black_screenfade(2);
        set_task(1.0, "set_full_black", TASK_FULLBLACK);
    }
    if(get_num(BLOCK_CHAT)) {
        g_bBlockChat = true;
    }
    if(get_num(BLOCK_VOICE)) {
        set_num(VOICE_ENABLED, 0);
    }
    if(get_num(FREEZE_IN_VOTE)) {
        if(get_num(FREEZE_IN_VOTE) == FREEZE_TIME_ENABLED
            && (type == VOTE_BY_SCHEDULER || type == VOTE_BY_RTV || type == VOTE_BY_CMD)
            && get_num(VOTE_IN_NEW_ROUND)) {
            // increase freezetime
            g_bFreezetimeChanged = true;
            set_float(FREEZETIME, get_float(FREEZETIME) + get_float(PREPARE_TIME) + get_float(VOTE_TIME) + 1);
        } else {
            freeze_unfreeze(0);
        }
    }
    EnableHamForward(g_hHamSpawn);
}
public mapm_vote_started(type)
{
    send_audio(0, "sound/Gman/Gman_Choose2.wav", PITCH_NORM);
}
public mapm_vote_finished(const map[], type, total_votes)
{
    disable_effects(map);
}
public mapm_vote_canceled(type)
{
    disable_effects("");
}
disable_effects(const map[])
{
    if(get_num(BLACK_SCREEN)) {
        remove_task(TASK_FULLBLACK);
        set_black_screenfade(0);
    }
    if(get_num(BLOCK_CHAT)) {
        g_bBlockChat = false;
    }
    if(get_num(BLOCK_VOICE)) {
        set_num(VOICE_ENABLED, 1);
    }
    if(get_num(FREEZE_IN_VOTE) != FREEZE_DISABLED) {
        if(g_bFreezetimeChanged) {
            // decrease freezetime
            g_bFreezetimeChanged = false;
            set_float(FREEZETIME, get_float(FREEZETIME) - get_float(PREPARE_TIME) - get_float(VOTE_TIME) - 1);
        }
        if(get_num(CHANGE_TYPE) || get_num(LAST_ROUND) || is_map_extended(map)) {
            freeze_unfreeze(1);
        }
    }
    DisableHamForward(g_hHamSpawn);
}
public set_full_black(taskid)
{
    set_black_screenfade(1);
}
stock freeze_unfreeze(type)
{
    new players[32], pnum; get_players(players, pnum, "a");
    for(new id, i; i < pnum; i++) {
        id = players[i];
        set_pev(id, pev_flags, type ? (pev(id, pev_flags) & ~FL_FROZEN) : pev(id, pev_flags) | FL_FROZEN);
    }
}
is_map_extended(const map[])
{
    return equali(map, g_sCurMap);
}
stock set_black_screenfade(fade)
{
    new time, hold, flags;
    static msg_screenfade; if(!msg_screenfade) msg_screenfade = get_user_msgid("ScreenFade");
   
    switch (fade) {
        case 1: { time = 1; hold = 1; flags = 4; }
        case 2: { time = 4096; hold = 1024; flags = 1; }
        default: { time = 4096; hold = 1024; flags = 2; }
    }

    message_begin(MSG_ALL, msg_screenfade);
    write_short(time);
    write_short(hold);
    write_short(flags);
    write_byte(0);
    write_byte(0);
    write_byte(0);
    write_byte(255);
    message_end();
}
#pragma semicolon 1 для чего загуглите, потом глядите ошибку
 
Сверху Снизу