Thread: [Solved] [L4D2] Hide HUD
View Single Post
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 07-19-2018 , 15:52   Re: [L4D2] Hide HUD
Reply With Quote #10

Quote:
Originally Posted by LenHard View Post
PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

#define HIDEFLAG 64

public void OnClientPutInServer(int client)
{
    if (!
IsFakeClient(client)) CreateTimer(0.7Timer_HudGetClientUserId(client), TIMER_REPEAT);    
}

public 
Action Timer_Hud(Handle hTimerany iUser)
{
    
int client GetClientOfUserId(iUser);

    if (
client <= MaxClients && IsClientInGame(client))
    {
        if (
GetClientMenu(client) != MenuSource_None)
            
SetEntProp(clientProp_Send"m_iHideHUD"GetEntProp(clientProp_Send"m_iHideHUD") & ~HIDEFLAG); 
        else
            
SetEntProp(clientProp_Send"m_iHideHUD"HIDEFLAG); 
        return 
Plugin_Continue;
    }
    else return 
Plugin_Stop;

That's because you killed the timer by returning Plugin_Stop after you checked if the client is viewing a menu. Try this (untested)
can u create plugins with cl_glow_blur_scale 0 ? I can not change client command to other people
Please help me if u can
hoanganh81097 is offline