Raised This Month: $12 Target: $400
 3% 

[CS:GO] hidehud broken?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wsky
Junior Member
Join Date: Dec 2020
Old 03-06-2023 , 12:54   [CS:GO] hidehud broken?
Reply With Quote #1

I am trying to hide some hud elements by doing this:
PHP Code:
SetEntProp(client,Prop_Send,"m_iHideHUD",GetEntProp(client,Prop_Send,"m_iHideHUD") | 9
I'm sure this used to work not too long ago, but now it does nothing.
Using the console command "hidehud 9" works as expected.
wsky is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-06-2023 , 14:11   Re: [CS:GO] hidehud broken?
Reply With Quote #2

Value integer 9 is in binary 1001.

So I guess, you hide HIDEHUD_WEAPONSELECTION and HIDEHUD_HEALTH
Don't know is this chart accurate.

PHP 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 )   // Hides the radar in CS1.5
#define HIDEHUD_MINISCOREBOARD      ( 1<<13 )   // Hides the miniscoreboard in CS1.5 
Try this, does it work. I don't know what you want.
PHP Code:
        int bits GetEntProp(client,Prop_Send,"m_iHideHUD");
        
bits |= (1<<0);
        
bits |= (1<<3);

        
SetEntProp(client,Prop_Send,"m_iHideHUD"bits) ; 
__________________
Do not Private Message @me
Bacardi is offline
wsky
Junior Member
Join Date: Dec 2020
Old 03-06-2023 , 14:42   Re: [CS:GO] hidehud broken?
Reply With Quote #3

Quote:
So I guess, you hide HIDEHUD_WEAPONSELECTION and HIDEHUD_HEALTH
Thats exactly what i'm trying to do.

Since (1<<0) | (1<<3) equals to 9 your code should do the same as mine.
Unfortunately it also doesn't work

As already mentioned "hidehud 9" in console hides both health and weaponselection, so the 9 shouldn't be the issue.

Did you try with your code? Maybe im doing something entirely wrong
wsky is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-06-2023 , 16:17   Re: [CS:GO] hidehud broken?
Reply With Quote #4

I couldn't hide those also, but for example HIDEHUD_ALL works what I quick test.
- It look like health and weapon is set from client-side. Not sure.

I try look it more.
__________________
Do not Private Message @me
Bacardi is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-06-2023 , 17:06   Re: [CS:GO] hidehud broken?
Reply With Quote #5

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;

...

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) ;

__________________
Do not Private Message @me

Last edited by Bacardi; 03-06-2023 at 17:10.
Bacardi is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 03-06-2023 , 21:13   Re: [CS:GO] hidehud broken?
Reply With Quote #6

Quote:
Originally Posted by wsky View Post
I am trying to hide some hud elements by doing this:
PHP Code:
SetEntProp(client,Prop_Send,"m_iHideHUD",GetEntProp(client,Prop_Send,"m_iHideHUD") | 9
I'm sure this used to work not too long ago, but now it does nothing.
Using the console command "hidehud 9" works as expected.
https://github.com/oqyh/Plugins-Made...in/Hud%20Hider
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh
oqyh is offline
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode