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

With this code:
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;
    }
    if (
GetClientMenu(client) != MenuSource_None)
    {
        return 
Plugin_Stop;
    }
    
SetEntProp(clientProp_Send"m_iHideHUD"64);
    return 
Plugin_Continue

It shows admin menu and HUD only when I'm dead, but also even if I close admin menu, HUD is still showing.
alcybery is offline