Thread: [Solved] [L4D2] Hide HUD
View Single Post
alcybery
Member
Join Date: Apr 2016
Old 06-14-2018 , 02:30   Re: [L4D2] Hide HUD
Reply With Quote #3

Quote:
Originally Posted by LenHard View Post
The hides admin menu problem is probably because of the flag you're using.
For the display hud when dead, you could try hooking player_death and resetting their m_iHideHud flags.
If that didn't work you could attempt to make a repeating timer.
Thanks, hooking player_death worked. But HUD still shows up after campaign change, so I did a repeating timer:
PHP Code:
#pragma semicolon 1
#include <sourcemod>

public OnClientPutInServer(client)
{
    
CreateTimer(0.5Timer_HUDGetClientUserId(client), TIMER_REPEAT);
}

public 
Action:Timer_HUD(Handle:timerany:data)
{
    new 
client GetClientOfUserId(data);
    if (
client == 0)
    {
        return 
Plugin_Stop;
    }
    
SetEntProp(clientProp_Send"m_iHideHUD"64);
    return 
Plugin_Continue;

It works, but I still have the problem with it hiding the admin menu. What flag I should be using to not hide the admin menu?

Last edited by alcybery; 06-14-2018 at 02:32. Reason: typo
alcybery is offline