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

HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PastyBully
Junior Member
Join Date: Dec 2016
Old 11-17-2018 , 04:19   HUD
Reply With Quote #1

efzfez

Last edited by PastyBully; 06-06-2022 at 14:18.
PastyBully is offline
TheWho
AlliedModders Donor
Join Date: Jul 2012
Old 11-19-2018 , 04:46   Re: HUD
Reply With Quote #2

maybe try to check every bit and see if your lucky?
Code:
public void OnClientPutInServer(int client)
{
	SDKHook(client, SDKHook_PreThinkPost, Hook_PreThinkPost);
}

public void Hook_PreThinkPost(int client)
{
	for(int j = 3; j<64; j++)
	{
		int flags = GetEntProp(client, Prop_Send, "m_iHideHUD");
		SetEntProp(client, Prop_Send, "m_iHideHUD", flags | (1<<j)); 
	}
}
oh and btw the first two are for hiding everything so start with 3!

Code:
#define hideeverything (1<<1)
#define showhud (1<<2)
#define hidehud (1>>2)

and maybe this works for you:
Quote:
Originally Posted by Bacardi View Post
Well, player HUD will behavior on game events, like bomb_planted, round_end and so on.
And when game_type is changed, but then player need reconnect to server.

These are more client side effect.

Here one example. For classic game play (game_type 0)
This hide clock digits, like for example when round_end. But bad side is, you also here "Round Draw"
And this event is send to players, and will not disturp other SM plugins by fake events.
PHP Code:
public void OnPluginStart()
{
    
HookEvent("round_freeze_end"round_freeze_endEventHookMode_PostNoCopy);
}

public 
void round_freeze_end(Event event, const char[] namebool dontBroadcast)
{

    
Event event CreateEvent("round_end");
    
event.SetInt("winner"1);

    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && !IsFakeClient(i)) event.FireToClient(i);
    }

    
delete event;


Last edited by TheWho; 11-19-2018 at 04:51.
TheWho is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-19-2018 , 12:38   Re: HUD
Reply With Quote #3

Quote:
Originally Posted by TheWho View Post
oh and btw the first two are for hiding everything so start with 3!
Says who? https://github.com/ValveSoftware/sou...fs.h#L194-L205
Mitchell is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 11-21-2018 , 00:49   Re: HUD
Reply With Quote #4

Quote:
Originally Posted by TheWho View Post
maybe try to check every bit and see if your lucky?
Code:
public void OnClientPutInServer(int client)
{
	SDKHook(client, SDKHook_PreThinkPost, Hook_PreThinkPost);
}

public void Hook_PreThinkPost(int client)
{
	for(int j = 3; j<64; j++)
	{
		int flags = GetEntProp(client, Prop_Send, "m_iHideHUD");
		SetEntProp(client, Prop_Send, "m_iHideHUD", flags | (1<<j)); 
	}
}
up to 63? sourcepawn data types are 4 bytes (32 bits), this shouldn't work as intended
__________________
retired
shavit 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 08:05.


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