Thank you Freecode, that works beautifully, I also have 1 more problem I come across when I'm trying to use set_task to time certain events.
In the following code, I'm trying to make a 2 second interval between functions :
Code:
#include <amxmodx>
#include <fun>
#define MAX_PLAYERS 32 //will be used later on
public plugin_init()
{
register_plugin("Environment Status","1.10","Lloyd Banks")
//register_event("Damage","event_damage","b") // Used in another part of script
set_task(12.0,"event_damage",846,"",0,"b")
register_event("DeathMsg","event_death","b")
}
public event_death(id)
{
client_cmd(id, "spk fvox/beep.wav")
set_task(2.0,"do_beep2",849,"",0,"b")
return PLUGIN_CONTINUE
}
public do_beep2(id)
{
client_cmd(id, "spk fvox/beep.wav")
set_task(2.0,"do_beep3",850,"",0,"b")
return PLUGIN_CONTINUE
}
public do_beep3(id)
{
client_cmd(id, "spk fvox/beep.wav")
set_task(2.0,"do_flatline",851,"",0,"b")
return PLUGIN_CONTINUE
}
public do_flatline(id)
{
client_cmd(id, "spk fvox/flatline.wav")
return PLUGIN_HANDLED
}
I believe thats supposed to work, but whenever I've been killed, no sound is played. This is one problem that has plagued me for a while as well. Have any solutions?
__________________