#define PLUGIN_NAME "Unnamed"
#define PLUGIN_VERSION "dev"
#define PLUGIN_AUTHOR "MakapoH."
#define MAX_WINS_TE 10 // Максимальное количество побед террористов для смены карты
#define MAX_WINS_CT 10 // Максимальное количество побед кт для смены карты
#define NEXT_MAP "de_dust2" // На какую карту менять
#include <amxmodx>
new ter_win_num;
new ct_win_num;
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_logevent("LogEvent_StartRound", 2, "1=Round_Start");
register_event("SendAudio", "Event_SendAudio_TerroristsWin", "a", "2&%!MRAD_terwin");
register_event("SendAudio", "Event_SendAudio_CtWin", "a", "2&%!MRAD_ctwin");
register_event("TextMsg", "Event_TextMsg_RestartGame", "a", "2=#Game_will_restart_in", "2=#Game_Commencing");
}
public Event_SendAudio_TerroristsWin() {
ter_win_num++;
}
public Event_SendAudio_CtWin() {
ct_win_num++;
}
public LogEvent_StartRound() {
if(ter_win_num == MAX_WINS_TE - 1 && ct_win_num == MAX_WINS_CT - 1) {
}
else if(ter_win_num == MAX_WINS_TE - 1) {
}
else if(ct_win_num == MAX_WINS_CT - 1) {
}
else if(ter_win_num == MAX_WINS_TE || ct_win_num == MAX_WINS_CT) {
engine_changelevel(NEXT_MAP);
}
}
public Event_TextMsg_RestartGame() {
ter_win_num = ct_win_num = 0;
}