Quote:
Originally Posted by OciXCrom
Show the full code.
|
this?
if (g_iPrepTime)
{
g_boolCanBuild = false
g_boolPrepTime = true
g_iCountDown = g_iPrepTime+1
set_task(1.0, "task_PrepTime", TASK_PREPTIME,_, _, "a", g_iCountDown);
set_dhudmessage(255, 205, 80, -1.0, 0.25, 0, 6.0, 0.001, 0.1, 1.0, false);
show_dhudmessage(0, " %L : 0:%s%d ", LANG_SERVER, "PREP_TIMER", (g_iCountDown < 10 ? "0" : ""), g_iCountDown);
new players[32], num
get_players(players, num)
for (new i = 0; i < num; i++)
{
if (g_isAlive[players[i]] && !g_isZombie[players[i]])
{
ExecuteHamB(Ham_CS_RoundRespawn, players[i])
if (g_iOwnedEnt[players[i]])
cmdStopEnt(players[i])
}
}
print_color(0, "%s^x04 %L", MODNAME, LANG_SERVER, "PREP_ANNOUNCE")
client_cmd(0, "spk %s", PHASE_PREP)
ExecuteForward(g_fwPrepStarted, g_fwDummyResult);
}
else
Release_Zombies()
remove_task(TASK_BUILD);
return PLUGIN_HANDLED;
}
new szTimer[32]
if (g_iCountDown>10)
{
if (mins && !secs) num_to_word(mins, szTimer, 31)
else if (!mins && secs == 30) num_to_word(secs, szTimer, 31)
else return PLUGIN_HANDLED;
client_cmd(0, "spk ^"fvox/%s %s remaining^"", szTimer, (mins ? "minutes" : "seconds"))
}
else
{
num_to_word(g_iCountDown, szTimer, 31)
client_cmd(0, "spk ^"fvox/%s^"", szTimer)
}
return PLUGIN_CONTINUE;
}
public task_PrepTime()
{
g_iCountDown--
if (g_iCountDown>=0)
client_print(0, print_center, "%L - 0:%s%d", LANG_SERVER, "PREP_TIMER", (g_iCountDown < 10 ? "0" : ""), g_iCountDown)
if (0<g_iCountDown<11)
{
new szTimer[32]
num_to_word(g_iCountDown, szTimer, 31)
client_cmd(0, "spk ^"fvox/%s^"", szTimer)
}
else if (g_iCountDown == 0)
{
Release_Zombies()
remove_task(TASK_PREPTIME);
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE;