#include #pragma semicolon 1 new g_scTitle[] = "Last Round"; new g_scVersion[] = "2.0"; new g_scAuthor[] = "many"; new bool:g_lastround = false; new bool:g_changemap = false; new Float:g_timelimit = 0.0; new Float:g_maxspeed; #define INITIATE_LAST_ROUND_TASK 545454 #define CHANGE_MAP_TASK 545455 #define DISABLE_PLAYERS_TASK 545456 public evRoundStart() { if (!get_cvar_num("lastround")) return PLUGIN_CONTINUE; // Wanted this in init but never got a value if (g_timelimit == 0.0) g_timelimit = get_cvar_float("mp_timelimit"); if (g_lastround) { set_cvar_float("mp_timelimit", 0.0); new text[256]; format(text, 255, "This is the final round"); doTypesay(text, 5, 255, 255, 255); g_changemap = true; g_lastround = false; } else if (g_changemap) { new nextmap[32]; get_cvar_string("amx_nextmap", nextmap, 31); new text[256]; format(text, 255, "Thank you for playing. Now switching to %s!", nextmap); doTypesay(text, 5, 255, 255, 255); g_maxspeed = get_cvar_float("sv_maxspeed"); set_cvar_float("sv_maxspeed", 0.0); set_task(0.1, "disablePlayers", DISABLE_PLAYERS_TASK, "", 0, "a", 4); set_task(6.0, "changeMap", CHANGE_MAP_TASK); } return PLUGIN_CONTINUE; } public initiateLastRound() { if (!get_cvar_num("lastround")) return PLUGIN_CONTINUE; remove_task(INITIATE_LAST_ROUND_TASK); new text[256]; format(text, 255, "The final round is coming up"); doTypesay(text, 5, 255, 255, 255); set_cvar_float("mp_timelimit", 0.0); g_lastround = true; return PLUGIN_CONTINUE; } public disablePlayers() { server_cmd("mp_friendlyfire 0"); new players[32], num; get_players(players, num, "c"); for(new i=0;i