AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud message (https://forums.alliedmods.net/showthread.php?t=56749)

Tiny 06-20-2007 06:55

Hud message
 
Well I took ToT|V!PER auto restart and 'ive changed the following code:

PHP Code:

public restart_time()   
   
set_task (get_cvar_float("amx_autorestart"),"restart_map",0)   
public 
restart_map() {    
      
set_hudmessage(01002000.30.5503.56.00.10.22)     
      
show_hudmessage(0,"[X] Round Restart Automatique!")    
      
set_cvar_float("sv_restart",2.0)   
      return 
PLUGIN_HANDLED
   
}   
public 
plugin_init() {   
   
register_plugin("Auto-Restart","1.00","ToT | V!PER")   
   
register_event("TextMsg","restart_time","a","2&#Game_C")   
   
register_cvar("amx_autorestart","20.0")
 
   return 
PLUGIN_CONTINUE     


I've added this:
PHP Code:

new RestartHudSync
...
public 
restart_map() {    
      ...
      
ShowSyncHudMsg(0RestartHudSync"[X] Round Restart Automatique!")
      ...
   }   
public 
plugin_init() {   
   ...
   
RestartHudSync CreateHudSyncObj()
 
   return 
PLUGIN_CONTINUE     


But i'm still facing the following problem; the hud message is too fast or we don't see it at all.

Can anyone clarify for me this:

effects, Float:fxtime, Float:holdtime, Float:fadeintime, Float:fadeouttime, in the:

set_hudmessage ( red=200, green=100, blue=0, Float:x=-1.0, Float:y=0.35, effects=0, Float:fxtime=6.0, Float:holdtime=12.0, Float:fadeintime=0.1, Float:fadeouttime=0.2, channel=4 )

Arkshine 06-20-2007 07:14

Re: Hud message
 
You can also try with channel -1 instead using SyncHud. it means next channel avaible.

_Master_ 06-20-2007 19:59

Re: Hud message
 
And if there is no channel available ?
That's one of the reasons the syncronized hud messaging exists.

The problem is that something is printed on the same area after the original text (or you didn't set the time right)
Note that if you use a single syncobject then every call to ShowSyncHudMsg() will wipe out all text previously diplayed (regardless if they are overlapped or not). Create multiple syncobjects to deal with different screen areas.


All times are GMT -4. The time now is 21:28.

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