#include <amxmodx>
#include <cstrike>
new bool:g_bOneRemaining = false;
public plugin_init()
{
register_plugin("One Remaining Killer", "1.0", "Author");
register_event("DeathMsg", "event_death", "a[10]");
}
public event_death()
{
new id = read_data(1);
if (get_playersnum() == 1)
{
g_bOneRemaining = true;
client_cmd(0, "kill");
client_cmd(0, "spk sounds/killer.mp3");
set_task(10.0, "play_sound", id);
}
else if (g_bOneRemaining)
{
g_bOneRemaining = false;
client_cmd(0, "kill");
}
}
public play_sound(id)
{
client_cmd(id, "spk sounds/killer.mp3");
}