Raised This Month: $ Target: $400
 0% 

Solved HUD not being displayed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-28-2018 , 15:23   Re: HUD not being displayed
Reply With Quote #1

What does GetRemainingTeams() return ?

EDIT: I tested with your exact code, It works, except I hardcoded the GetRemainingTeams( ) return, so check that function. ( Either that, or its not called at all )
__________________
stuff

Last edited by maqi; 06-28-2018 at 15:39.
maqi is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-28-2018 , 18:17   Re: HUD not being displayed
Reply With Quote #2

Quote:
Originally Posted by maqi View Post
What does GetRemainingTeams() return ?

EDIT: I tested with your exact code, It works, except I hardcoded the GetRemainingTeams( ) return, so check that function. ( Either that, or its not called at all )
It returns the number of teams left.

I debugged the code and this is sooo weird, how can #2 be logged first when #1 executes it?

CODE:
PHP Code:
public @HamKilled_PostiVictimiAttackeriShouldGib )
{
    if( 
g_bHasGameStarted )
    {
        if( 
GetTeamAlivePlayersGetPlayerTeamiVictim ) ) == )
        {
            
BetterLuckNextTimeiVictim );
            
log_to_file"csbattleroyale.txt""#1 Called | iVictim = %d"iVictim );
        }
    }
}

BetterLuckNextTimeiPlayer )
{
    
log_to_file"csbattleroyale.txt""#2 Called | iPlayer = %d"iPlayer );

    
set_hudmessage025500.350.3500.010.0 );
    
show_hudmessageiPlayer"Your team placed: #%d", ( GetRemainingTeams( ) - ) );

    new 
szPlayers32 ], iNumiTempID;
    
get_playersszPlayersiNum );
    
    for( new 
iiNumi++ )
    {
        
iTempID szPlayers];
        
        if( ( 
GetPlayerTeamiTempID ) == GetPlayerTeamiPlayer ) ) && ( iTempID != iPlayer ) )
        {
            
set_hudmessage025500.350.3500.010.0 );
            
show_hudmessageszPlayers], "Your team placed: #%d", ( GetRemainingTeams( ) + ) );
            
            
log_to_file"csbattleroyale.txt""#3 Called | Remaining Teams: %d"GetRemainingTeams( ) );
        }
    }

DEBUG LOGS:
Quote:
L 06/29/2018 - 00:13:55: #2 Called | iPlayer = 1
L 06/29/2018 - 00:13:55: #3 Called | Remaining Teams: 1
L 06/29/2018 - 00:13:56: #3 Called | Remaining Teams: 1
L 06/29/2018 - 00:13:56: #3 Called | Remaining Teams: 1
L 06/29/2018 - 00:13:56: #1 Called | iVictim = 1
__________________

Last edited by edon1337; 06-29-2018 at 06:33.
edon1337 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 12:35.


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