Raised This Month: $32 Target: $400
 8% 

[REQ]Force Disable HUD[CSS]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-20-2009 , 01:40   [REQ]Force Disable HUD[CSS]
Reply With Quote #1

If its possible which I heard it is, could someone make a plugin that disables HUD elments via cvar, Example below.

1 = enabled/0 = disabled

If enabled on each client connect force disablehud.

sm_disablehud_all
sm_disablehud_health
sm_disablehud_armour
sm_disablehud_ammo/weapon selection
__________________

Last edited by Sgt-Mess; 05-05-2009 at 03:36.
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-22-2009 , 01:13   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #2

bump.
__________________
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 01-22-2009 , 06:00   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #3

Not possible (afaik) it'd require forcing the cvar cl_drawhud 0, which is not possible last I checked.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-22-2009 , 12:57   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #4

Quote:
Originally Posted by FlyingMongoose View Post
Not possible (afaik) it'd require forcing the cvar cl_drawhud 0, which is not possible last I checked.
Ok Thank you for replying.
__________________
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 01-22-2009 , 13:04   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #5

You actually can disable the HUD for players. I think it's the m_iHideHud offset. The CSS HUD doesn't obey everything exactly. IIRC it's either on or off and there is only one middle ground (don't remember exactly what can be turned on/off specifically though).

Play with changing these flags in the m_iHideHud offset:
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_BITCOUNT            12 
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-22-2009 , 14:05   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #6

Quote:
Originally Posted by L. Duke View Post
You actually can disable the HUD for players. I think it's the m_iHideHud offset. The CSS HUD doesn't obey everything exactly. IIRC it's either on or off and there is only one middle ground (don't remember exactly what can be turned on/off specifically though).

Play with changing these flags in the m_iHideHud offset:
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_BITCOUNT            12 
Thanks for the reply although I don't know what any of that means, if someone with more knowledge of coding can look into this to see if its still possible I'd really appreciate it.

All I'm really trying to do is have it to where it hides "ammo & health" and maybe crosshair, I dunno how many people would like that in css though haha.
__________________
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 01-26-2009 , 07:01   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #7

Explanation: it looks like it may be possible, but it would take tweaking and whatnot, it also depends on what on the hud you want removed.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-26-2009 , 09:38   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #8

Quote:
Originally Posted by FlyingMongoose View Post
Explanation: it looks like it may be possible, but it would take tweaking and whatnot, it also depends on what on the hud you want removed.
If it where to work I wanted to have it disable "Health, Armour, Ammo/weapon selection, Radar". I'm not sure if there are other attributes for hud elements in css but hiding "Money Amount" would be a nice one also.

I guess you can say I'm attempting to pursue a HardCore mod for counter strike source. If you have played COD4 you would know what this is.
__________________
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 01-26-2009 , 10:20   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #9

Make sure you have the types defined in your plugin or elsewhere before you try and use them.

Code:
public Action:Command_TestHUD(client, args)
{
    new hudflags = GetEntProp(client, Prop_Send, "m_iHideHUD");
    hudflags |= HIDEHUD_ALL;
    SetEntProp(client, Prop_Send, "m_iHideHUD", hudflags);
}
__________________
CrimsonGT is offline
Sgt-Mess
Senior Member
Join Date: Dec 2007
Location: Sway Side,WA
Old 01-26-2009 , 11:31   Re: [REQ]Force Disable HUD[CSS]
Reply With Quote #10

Quote:
Originally Posted by CrimsonGT View Post
Make sure you have the types defined in your plugin or elsewhere before you try and use them.

Code:
public Action:Command_TestHUD(client, args)
{
    new hudflags = GetEntProp(client, Prop_Send, "m_iHideHUD");
    hudflags |= HIDEHUD_ALL;
    SetEntProp(client, Prop_Send, "m_iHideHUD", hudflags);
}
If you where directing this towards me to try I know nothing about coding, Although I have tried to do the best at which I thought might be wright from looking at code from other plugins but I really fail haha.
__________________
Sgt-Mess is offline
Send a message via AIM to Sgt-Mess
Reply



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 09:26.


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