Quote:
Originally Posted by Gabe Iggy
If the first parameter of ShowSyncHudMsg is 0 it will show to all players.
Loop through all players and check if they're spectator with cs_get_user_team()
Code:
public show()
{
if(!c4pl)
{
remove_task(652450)
return
}
if(c4cd>=0.0)
{
temp=c4cd/c4max
if(temp>=0.5)
{
r=510*(1.0-temp)
g=255.0
}
if(temp<0.5)
{
r=255.0
g=510*temp
}
for(new i = 1; i <= get_maxplayers();i++)
{
if(is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_SPECTATOR)
{
set_hudmessage(floatround(r),floatround(g),0,-1.0,0.80,0,_,1.0,_,_,4)
ShowSyncHudMsg(i,msg,"Anda a Defusear la bomba!!! Faltan %d segundos antes de que explote.",floatround(c4cd))
}
}
c4cd-=1.0
}
Untested
|
Thank you! works correctly;
I had corrected it before, I had a small typing error, but you corrected the code so I don't have to upload mine, thanks again!