sma:
Code: Select all
/*
Original author/idea: Mr.Apple
*/
#include <amxmodx>
const TASK_LOAD_SOUNDS = 1
const TASK_SOUND = 666 // satana code =]]
#define ID_SOUND (taskid - TASK_SOUND)
static const sound_list[][] =
{
"zp_sound/timer01.wav",
"zp_sound/timer02.wav",
"zp_sound/timer03.wav",
"zp_sound/timer04.wav",
"zp_sound/timer05.wav",
"zp_sound/timer06.wav",
"zp_sound/timer07.wav",
"zp_sound/timer08.wav",
"zp_sound/timer09.wav",
"zp_sound/timer10.wav"
}
static const sound_list2[] = "zp_sound/timestart.wav"
new g_count, g_time
public plugin_precache()
{
for(new i = 0 ; i < sizeof sound_list ; i++)
precache_sound(sound_list[i])
precache_sound(sound_list2)
}
public plugin_init()
{
register_plugin("Countdown Fix", "1.0", "P.Of.Pw")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start(id)
{
remove_task(id+TASK_SOUND)
g_time = 10
g_count = 9
set_task(float(TASK_LOAD_SOUNDS), "countdown_sound", id+TASK_SOUND, _, _, "b")
}
public client_disconnect(id)
remove_task(id+TASK_SOUND)
public countdown_sound(taskid)
{
static id
id = ID_SOUND
client_cmd(id, "spk %s", sound_list[g_count])
g_count--
set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10)
show_hudmessage(id, "In %i secunde se v-a raspandi virusul !", g_time)
--g_time
if(g_time < 1)
{
client_cmd(id, "spk %s", sound_list2)
remove_task(id+TASK_SOUND)
}
}