PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "TEST"
#define VERSION "1.0"
#define AUTHOR "TEST"
new Restante
new Tiempo
new g_maxplayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "death_event", "a")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
g_maxplayers = get_maxplayers()
}
public death_event()
{
set_task(1.0, "Restante1")
}
public event_round_start()
{
set_task(1.0, "Restante1")
Tiempo = 20
Restante = 19
}
public Restante1()
{
static i
for (i = 1; i <= g_maxplayers; i++)
{
if(is_user_alive(i) && fnGetT() == 1 && get_user_team(i) == 1)
{
Restante--
set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
show_hudmessage(0, "Tiempo Restante: %i", Tiempo);
--Tiempo;
if(Tiempo >= 1)
{
set_task(1.0, "Restante1")
}
}
}
}
fnGetT()
{
static iT, i
iT = 0
for (i = 1; i <= g_maxplayers; i++)
{
if (is_user_alive(i) && get_user_team(i) == 1)
iT++
}
return iT;
}
help
sorry*
how to add hud message with the cont is finished..