View Single Post
wsky
Junior Member
Join Date: Dec 2020
Old 03-07-2023 , 18:34   Re: [CS:GO] hidehud broken?
Reply With Quote #7

Does this do anything different? Other than adding a menu

Quote:
Originally Posted by Bacardi View Post
Ok, actually server is keeping those hud bits active (health, weapon select)
- Or it is client-side ? I'm confuse. Because it accept value and not change from sever side.
Code:
void CBasePlayer::UpdateClientData( void )

...

	// make sure these hud elements are always in the correct state
	m_Local.m_iHideHUD &= ~HIDEHUD_HEALTH;
	m_Local.m_iHideHUD &= ~HIDEHUD_WEAPONSELECTION;

...
Thats weird, i'm pretty sure it wasn't like that a few months ago. I wonder why they changed it like that.


Quote:
Originally Posted by Bacardi View Post
You can... counter attack by spamming it another value
- This is very spammy plugin now. "Called every frame by PlayerPreThink"
PHP Code:
...

    
SDKHook(clientSDKHook_PreThinkPostPreThinkPost);
...





public 
void PreThinkPost(int client)
{
    
int bits GetEntProp(client,Prop_Send,"m_iHideHUD") ;
    
bits |= (1<<0) | (1<<3);
    
SetEntProp(client,Prop_Send,"m_iHideHUD"bits) ;

That works perfectly! Kinda sucks that it has to be done every frame, but its probably not too bad for performance
wsky is offline