|
Senior Member
|
07-19-2018
, 15:52
Re: [L4D2] Hide HUD
|
#11
|
Quote:
Originally Posted by LenHard
PHP Code:
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
#define HIDEFLAG 64
public void OnClientPutInServer(int client)
{
if (!IsFakeClient(client)) CreateTimer(0.7, Timer_Hud, GetClientUserId(client), TIMER_REPEAT);
}
public Action Timer_Hud(Handle hTimer, any iUser)
{
int client = GetClientOfUserId(iUser);
if (0 < client <= MaxClients && IsClientInGame(client))
{
if (GetClientMenu(client) != MenuSource_None)
SetEntProp(client, Prop_Send, "m_iHideHUD", GetEntProp(client, Prop_Send, "m_iHideHUD") & ~HIDEFLAG);
else
SetEntProp(client, Prop_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
|
|
|
|