Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("testsounds",1.0,"fLyEnIg")
register_event("ResetHUD", "other_sounds", "b");
}
public other_sounds()
{
set_task(60.0, "oneminremsound", 0, _, _, "d")
set_task(30.0, "thirtysecremsound", 0, _, _, "d")
set_task(10.0, "tensecremsound", 0, _, _, "d")
set_task(1.0,"gameover", 0, _, _, "d")
}
public oneminremsound()
{
client_cmd(0,"stopsound")
client_cmd(0,"mp3 play sound/halomod/one_minute_remaining.mp3")
set_hudmessage(42, 170, 255, 0.04, 0.17, 0, 6.0, 12.0);
show_hudmessage(0, "1 Min Remaining!")
client_print(0,print_chat,"[HALO MOD]1 Min Remaining!")
}
public thirtysecremsound()
{
client_cmd(0,"stopsound")
client_cmd(0,"mp3 play sound/halomod/thirty_seconds_remaining.mp3")
set_hudmessage(42, 170, 255, 0.04, 0.17, 0, 6.0, 12.0);
show_hudmessage(0, "30 Seconds Remaining!")
client_print(0,print_chat,"[HALO MOD]30 Seconds Remaining!")
}
public tensecremsound()
{
client_cmd(0,"stopsound")
client_cmd(0,"mp3 play sound/halomod/ten_seconds_remaining.mp3")
set_hudmessage(42, 170, 255, 0.04, 0.17, 0, 6.0, 12.0);
show_hudmessage(0, "10 Seconds Remaining!")
client_print(0,print_chat,"[HALOMOD]10 Seconds Remaining!")
}
public gameover()
{
client_cmd(0,"stopsound")
client_cmd(0, "mp3 play sound/halomod/gameover.mp3")
set_hudmessage(42, 170, 255, 0.04, 0.17, 0, 6.0, 12.0);
show_hudmessage(0, "GameOver!")
client_print(0,print_chat,"[HALOMOD]GameOver!")
}