hi,
im writig my first plugin

yea no mod anymore & i have a mini problem.
i catch the freetime & give a countdown on screen.
so i want now to add the sounds. but the freezetime can be changed. how can i know howmany sounds schould be played?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <screenfade_util>
new time_s
public plugin_init()
{
register_plugin("Freezetime Countdown", "1.0", "One")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start()
{
set_task(1.0, "Start_countdown")
new freezetime = get_cvar_num("mp_freezetime")
time_s = freezetime - 2
}
public Start_countdown(id)
{
set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
show_hudmessage(0, "New round begin in %i!!", time_s);
UTIL_ScreenFade(id,{255,0,0},1.0,0.0,200)
--time_s;
if(time_s >= 0)
{
set_task(1.0, "Start_countdown")
}
if(time_s == 0)
{
set_task(1.0, "Start_countdown1")
}
}
public Start_countdown1(id)
{
set_hudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
show_hudmessage(0, "Go", time_s);
UTIL_ScreenFade(id,{0,255,0},1.0,0.0,200)
}
i thinked with case but i dont think that its a good idea. any ideas?
__________________