Code:
new g_current_color_red = 255
new g_current_color_green = 255
new g_current_color_blue = 255
public configure_last_round_HUD( bool:is_to_show )
{
if( is_to_show )
{
set_task( 1.0, "show_last_round_HUD", TASKID_SHOW_LAST_ROUND_HUD, _, _, "b" )
}
}
public show_last_round_HUD()
{
g_current_color_red = ( g_current_color_red + 50 ) % 256
g_current_color_green = ( g_current_color_green + 40 ) % 256
g_current_color_blue = ( g_current_color_blue + 30 ) % 256
set_hudmessage( g_current_color_red, g_current_color_green, g_current_color_blue,
0.15, 0.15, 0, 0.0, 1.0, 0.1, 0.1, 1 )
static last_round_message[ COLOR_MESSAGE ]
#if AMXX_VERSION_NUM < 183
static player_id
static players_number
static current_index
static players_ids[ 32 ]
#endif
last_round_message[ 0 ] = '^0'
if( g_isTimeToChangeLevel )
{
// This is because the Amx Mod X 1.8.2 is not recognizing the player LANG_PLAYER when it is
// formatted before with formatex(...)
#if AMXX_VERSION_NUM < 183
get_players( players_ids, players_number, "ch" );
for( current_index = 0; current_index < players_number; current_index++ )
{
player_id = players_ids[ current_index ]
formatex( last_round_message, charsmax( last_round_message ), "%L ^n%L",
player_id, "GAL_CHANGE_NEXTROUND", player_id, "GAL_NEXTMAP", g_nextmap )
REMOVE_COLOR_TAGS( last_round_message )
show_hudmessage( player_id, last_round_message )
}
#else
formatex( last_round_message, charsmax( last_round_message ), "%L ^n%L",
LANG_PLAYER, "GAL_CHANGE_NEXTROUND", LANG_PLAYER, "GAL_NEXTMAP", g_nextmap )
REMOVE_COLOR_TAGS( last_round_message )
show_hudmessage( 0, last_round_message )
#endif
}
else
{
#if AMXX_VERSION_NUM < 183
get_players( players_ids, players_number, "ch" );
for( current_index = 0; current_index < players_number; current_index++ )
{
player_id = players_ids[ current_index ]
formatex( last_round_message, charsmax( last_round_message ), "%L", player_id,
"GAL_CHANGE_TIMEEXPIRED" )
REMOVE_COLOR_TAGS( last_round_message )
show_hudmessage( player_id, last_round_message )
}
#else
formatex( last_round_message, charsmax( last_round_message ), "%L", LANG_PLAYER,
"GAL_CHANGE_TIMEEXPIRED" )
REMOVE_COLOR_TAGS( last_round_message )
show_hudmessage( 0, last_round_message )
#endif
}
}