PHP Code:
#include < amxmodx >
#define PLUGIN "AutoRRound"
#define VERSION "1.0"
#define AUTHOR "AXel"
#if defined _colorchat_included
#endinput
#endif
#define _colorchat_included
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new const TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
#define HUD_MESSAGES
#define MAX_COUNT 1
new g_Count
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR )
register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
state START_FUNCTION
}
public event_gamecomencing() g_Count = 0
public event_newround() < BLOCK_FUNCTION > { }
public event_newround() < START_FUNCTION >
{
if( g_Count++ == MAX_COUNT )
{
server_cmd( "sv_restart 1" )
#if defined HUD_MESSAGES
set_task( 1.0, "show_messages" )
#endif
state BLOCK_FUNCTION
}
}
public show_messages(player)
{
new current_map[32]
get_mapname(current_map, 31);
new playersnum = get_playersnum();
new maxplayers = get_maxplayers();
new timer[32], name_player[32], ip_player[32]
get_time("%m/%d/%Y - %H:%M:%S",timer,31);
get_user_name(player,name_player,31)
get_user_ip(player,ip_player,31,1)
ColorChat(0, GREEN, "--------------------------- RESTART ---------------------------")
ColorChat(0, GREEN, "^x04Harta Curenta: ^x03%s ^x01| ^x04Jucatori: ^x03%d/%d",
current_map, playersnum, maxplayers)
ColorChat(0, GREEN, "Data si timpul: %s", timer)
ColorChat(0, GREEN, "Nick-ul tau: ^"%s^" - IP-ul tau: %s", name_player, ip_player)
ColorChat(0, GREEN, "--------------------------- HF & GL ---------------------------")