AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hudmessage overwritting (https://forums.alliedmods.net/showthread.php?t=278647)

DavidLin 02-05-2016 08:36

hudmessage overwritting
 
So I have this function made which always called till player dies to show his info, and when other hud message is shown this info hud overwrites it and it doesn't show anything is there work around or something because I tried setting different channels and everything.

PHP Code:

public show_player_statisticstaskid ) {
        new 
id taskid TASK_ID_HUD;
        if( !
is_user_aliveid ) )
                return;

        
set_hudmessage2552552550.020.9106.01.10.00.0, -);
        
ShowSyncHudMsgidmsgSync2"%s - HP: %d - Armor: %d^n%s"PlayerInfoid ][ class_name ], get_user_healthid ), get_user_armorid ), PlayerInfoid ][ class_desc ] );
        
set_task0.1"show_player_statistics"id TASK_ID_HUD );


Overlaps for example:
PHP Code:

public RoundEnd( ) {
        
currentRound++;
        if( 
currentRound >= get_pcvar_numcvar_rounds ) ) {
                
set_hudmessage255255255, -1.0, -1.000.05.00.00.0, -);
                
ShowSyncHudMsg0msgSync"Teams are changing!" );

                
currentRound 0;
                new 
players32 ], num;
                
get_playersplayersnum );

                for( new 
id 0id numid++ )
                        
delayBetweenChangeplayersid ] );

        } else {
                
set_hudmessage255255255, -1.0, -1.000.05.00.00.0, -);
                
ShowSyncHudMsg0msgSync"Teams will change after %d round(-s)"get_pcvar_numcvar_rounds ) - currentRound );
        }



Bugsy 02-05-2016 08:39

Re: hudmessage overwritting
 
You can use different synchud objects if you want them to not overwrite each other. It looks like you may already be song this as I see your variable name is msgSync and msgSync2

DavidLin 02-05-2016 08:42

Re: hudmessage overwritting
 
Yes I created different msgsync but somehow it still overwrites the other ones, I have 3 of them and when I disable the infinite one, the ones that left work perfectly.

I also tried removing the stat hud message at round end but it still overwrites :D

DavidLin 02-06-2016 07:47

Re: hudmessage overwritting
 
FIXED. So the problem was xstats.amxx the default hud message display on round end.


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

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