Код
#include <amxmodx>
#define PLUGIN "Round/Info"
#define VERSION "1.0"
#define AUTHOR "Limo[?!]"
new g_Round;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("RoundStart", 2, "1=Round_Start");
register_event("TextMsg", "RestartRound", "a", "2&#Game_C", "2&#Game_w", "2&#Game_will_restart_in");
}
public RoundStart()
{
new szMapName[34], i_Players, i_MaxPlayers;
get_mapname(szMapName, charsmax(szMapName));
i_Players = get_playersnum();
i_MaxPlayers = get_maxplayers();
g_Round ++;
ChatColor(0, "^4[Info] ^3Раунд:^1 %d ^4| ^3Карта:^1 %s ^4| ^3Игроки:^1 %d/%d", g_Round, szMapName, i_Players, i_MaxPlayers);
}
public RestartRound()
{
g_Round = 0;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[181];
vformat(msg, 181, input, 3);
replace_all(msg, 181, "!g", "^4");
replace_all(msg, 181, "!y", "^1");
replace_all(msg, 181, "!team", "^3");
replace_all(msg, 181, "!team2", "^0");
if (id) players[0] = id; else get_players(players, count, "ch");
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}