Raised This Month: $ Target: $400
 0% 

Solved [request] [L4D2] Tankhud Panel Enhanced


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 10-25-2021 , 15:57   Re: [request] [L4D2] Tankhud Panel Enhanced
Reply With Quote #1

Quote:
Originally Posted by JLmelenchon View Post
What should i add?
Odd that the competitive framework version has the same return without closing the handle, but go ahead and try this

PHP Code:
public Action:HudDrawTimer(Handle:hTimer
{
    if (
IsInReady() || IsInPause())
        return 
Plugin_Handled;

    new 
bool:bSpecsOnServer false;
    for (new 
1<= MaxClientsi++) 
    {
        if (
IsSpectator(i))
        {
            
bSpecsOnServer true;
            break;
        }
    }

    if (
bSpecsOnServer// Only bother if someone's watching us
    
{
        new 
Handle:specHud CreatePanel();

        
FillHeaderInfo(specHud);
        
FillSurvivorInfo(specHud);
        
FillInfectedInfo(specHud);
        
FillTankInfo(specHud);
        
FillGameInfo(specHud);

        for (new 
1<= MaxClientsi++) 
        {
            if (!
bSpecHudActive[i] || !IsSpectator(i) || IsFakeClient(i))
                continue;

            
SendPanelToClient(specHudiDummySpecHudHandler3);
            if (!
bSpecHudHintShown[i])
            {
                
bSpecHudHintShown[i] = true;
                
CPrintToChat(i"<{olive}HUD{default}> Escriba {green}!spechud{default} en el chat para alternar el {blue}Espectador HUD{default}.");
            }
        }

        
CloseHandle(specHud);
    }
    
    new 
Handle:tankHud CreatePanel();
    if (
FillTankInfo(tankHudtrue))
    {
        for (new 
1<= MaxClientsi++) 
        {
            if (!
bTankHudActive[i] || !IsClientInGame(i) || IsFakeClient(i) || IsSurvivor(i) || (bSpecHudActive[i] && IsSpectator(i)))
                continue;

            
SendPanelToClient(tankHudiDummyTankHudHandler3);
            if (!
bTankHudHintShown[i])
            {
                
bTankHudHintShown[i] = true;
                
CPrintToChat(i"<{olive}HUD{default}> Escriba {green}!tankhud{default} en el chat para alternar el {red}Tank HUD{default}.");
            }
        }
    }
    
CloseHandle(tankHud);
    return 
Plugin_Continue;

dustinandband is offline
Reply


Thread Tools
Display Modes

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 05:00.


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