Code: Select all
#include <amxmodx> static const PLUGIN[] = "Info"static const VERSION[] = "0.1"static const AUTHOR[] = "k1ck" new g_teamScore[2]new g_enable_info public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TeamScore", "teamScore", "ab") g_enable_info = register_cvar("amx_info", "1") register_clcmd("info", "info_", 0, "- Displays Info.") register_clcmd("/info", "info_", 0, "- Displays Info.") register_clcmd("say info", "info_", 0, "- Displays Info.") register_clcmd("say /info", "info_", 0, "- Displays Info.") register_clcmd("timeleft", "info_", 0, "- Displays Info.") register_clcmd("/timeleft", "info_", 0, "- Displays Info.") register_clcmd("nextmap", "info_", 0, "- Displays Info.") register_clcmd("/nextmap", "info_", 0, "- Displays Info.") register_clcmd("say timeleft", "info_", 0, "- Displays Info.") register_clcmd("say /timeleft", "info_", 0, "- Displays Info.") register_clcmd("say nextmap", "info_", 0, "- Displays Info.") register_clcmd("say /nextmap", "info_", 0, "- Displays Info.") return PLUGIN_CONTINUE} public info_(id){ if (!get_pcvar_num(g_enable_info)) return PLUGIN_HANDLED new nextmap[32] get_cvar_string("amx_nextmap", nextmap, 31) new maxRounds = get_cvar_num("mp_maxrounds") new roundsleft = maxRounds - (g_teamScore[0] + g_teamScore[1]) new rl[32] format(rl, 31, "%d", roundsleft) new message[192] format(message, 191, "Map will change after %s more rounds. Next map will be %s.", (maxRounds == 0) ? "(NO_ROUNDS_SET)" : rl, nextmap) client_print(id, print_chat, message) return PLUGIN_CONTINUE} public teamScore(id){ new team[2] read_data(1, team, 1) g_teamScore[(team[0]== 'C') ? 0 : 1] = read_data(2)}
Map will change after ę0 more rounds. Next map will be .
Nerašo koks bus mapas? Kas blogai plugine?