AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_task can't work. (https://forums.alliedmods.net/showthread.php?t=100497)

ƒa†es™ 08-15-2009 04:36

set_task can't work.
 
why can't this work ??

PHP Code:

new i_cooldown_time33 ] = 0
 
public woootid )
{
          
i_cooldown_timeid ] = floatroundCooldown )
          
set_task1.0"ShowHUD"id__"a"i_cooldown_timeid ] )
}
 
public 
ShowHUDid )
{
 if ( 
is_user_aliveid ) )
 {
  
i_cooldown_timeid ] = i_cooldown_timeid ] - 1;
  
set_hudmessage20010000.750.9201.01.10.00.0, -)
  
show_hudmessageid"Woot Cooldown: %d"i_cooldown_timeid ] )
 }
 
  else
  {
  
remove_taskid )
 }


It doesn't show the HUD message.

Arkshine 08-15-2009 04:39

Re: set_task can't work.
 
Cooldown has the right value ? Meaning not 0 ?

ConnorMcLeod 08-15-2009 04:53

Re: set_task can't work.
 
Is this a cooldown for a command ?
If so, just use get_gametime to set next avaible command, and when player try to execute the command, print him the remaining time before next command.

ƒa†es™ 08-15-2009 06:37

Re: set_task can't work.
 
Quote:

Originally Posted by ConnorMcLeod (Post 900827)
Is this a cooldown for a command ?
If so, just use get_gametime to set next avaible command, and when player try to execute the command, print him the remaining time before next command.

I don't understand you.

I trying to show the client cooldown in hudmessage.


All times are GMT -4. The time now is 15:09.

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