Hello toy doing a book-keeper(meter), I need that it(he,she) detects the last terrorist and a message goes out for him(her) with the remaining time of 20 seconds.
For the present I have this that consegui with the zp the countdown alquien can help me...
Sorry I Use Google Traducer xD
PHP Code:
#define VERSION "1.0"
#define AUTHOR "Mr.Apple"
new Restante
new Tiempo
new g_iMaxPlayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
g_iMaxPlayers = get_maxplayers()
}
public event_round_start()
{
set_task(4.0, "Restante1")
Time = 20
Rest = 19
}
public Restante1()
{
new ctCount, trCount;
for (new i = 1; i <= g_iMaxPlayers; i++)
{
if (!is_user_alive(i))
{
continue;
}
switch (cs_get_user_team(i))
{
case CS_TEAM_CT:
{
ctCount++;
}
case CS_TEAM_T:
{
trCount++;
}
}
}
if (trCount > 1)
{
return PLUGIN_HANDLED;
}
if (ctCount == 0)
{
return PLUGIN_HANDLED;
}
Rest--
set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
show_hudmessage(0, "%i", Time);
--Time;
if(Time >= 1)
{
set_task(1.0, "Restante1")
}
return PLUGIN_HANDLED
}