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

hudmessage overwritting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidLin
Member
Join Date: Jan 2016
Old 02-05-2016 , 08:36   hudmessage overwritting
Reply With Quote #1

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 );
        }

DavidLin is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-05-2016 , 08:39   Re: hudmessage overwritting
Reply With Quote #2

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
__________________
Bugsy is online now
DavidLin
Member
Join Date: Jan 2016
Old 02-05-2016 , 08:42   Re: hudmessage overwritting
Reply With Quote #3

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

Last edited by DavidLin; 02-05-2016 at 08:43.
DavidLin is offline
DavidLin
Member
Join Date: Jan 2016
Old 02-06-2016 , 07:47   Re: hudmessage overwritting
Reply With Quote #4

FIXED. So the problem was xstats.amxx the default hud message display on round end.

Last edited by DavidLin; 02-06-2016 at 08:57.
DavidLin 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 11:05.


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