From shareddefs.h
Code:
//===================================================================================================================
// Hud Element hiding flags
#define HIDEHUD_WEAPONSELECTION ( 1<<0 ) // Hide ammo count & weapon selection
#define HIDEHUD_FLASHLIGHT ( 1<<1 )
#define HIDEHUD_ALL ( 1<<2 )
#define HIDEHUD_HEALTH ( 1<<3 ) // Hide health & armor / suit battery
#define HIDEHUD_PLAYERDEAD ( 1<<4 ) // Hide when local player's dead
#define HIDEHUD_NEEDSUIT ( 1<<5 ) // Hide when the local player doesn't have the HEV suit
#define HIDEHUD_MISCSTATUS ( 1<<6 ) // Hide miscellaneous status elements (trains, pickup history, death notices, etc)
#define HIDEHUD_CHAT ( 1<<7 ) // Hide all communication elements (saytext, voice icon, etc)
#define HIDEHUD_CROSSHAIR ( 1<<8 ) // Hide crosshairs
#define HIDEHUD_VEHICLE_CROSSHAIR ( 1<<9 ) // Hide vehicle crosshair
#define HIDEHUD_INVEHICLE ( 1<<10 )
#define HIDEHUD_BONUS_PROGRESS ( 1<<11 ) // Hide bonus progress display (for bonus map challenges)
#define HIDEHUD_RADAR ( 1<<12 ) // Hide the radar
#define HIDEHUD_BITCOUNT 13
Can remove flags with for example:
m_iHideHud &= ~HIDEHUD_CHAT
and add flags with
m_iHideHud |= HIDEHUD_CHAT
So what you would want to be doing is always removing the flag if it is set:
Code:
int hidehud = GetEntProp(client, Prop_Data, "m_iHideHUD");
if (hidehud & HIDEHUD_CHAT)
{
hidehud &= ~HIDEHUD_CHAT;
SetEntProp(client, Prop_Data, "m_iHideHUD", hidehud);
}