Raised This Month: $51 Target: $400
 12% 

Cs 1.6 hud prep_time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AweTTcs
Junior Member
Join Date: Dec 2021
Old 01-07-2022 , 16:36   Cs 1.6 hud prep_time
Reply With Quote #1

Hi I have a problem with hud prep_time displays for a second and disappears
How to fix?



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);
AweTTcs is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-07-2022 , 17:34   Re: Cs 1.6 hud prep_time
Reply With Quote #2

Show the full code.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
AweTTcs
Junior Member
Join Date: Dec 2021
Old 01-07-2022 , 17:53   Re: Cs 1.6 hud prep_time
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
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;
AweTTcs is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode