AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ]Force Disable HUD[CSS] (https://forums.alliedmods.net/showthread.php?t=84071)

Sgt-Mess 01-20-2009 01:40

[REQ]Force Disable HUD[CSS]
 
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

Sgt-Mess 01-22-2009 01:13

Re: [REQ]Force Disable HUD[CSS]
 
bump.

FlyingMongoose 01-22-2009 06:00

Re: [REQ]Force Disable HUD[CSS]
 
Not possible (afaik) it'd require forcing the cvar cl_drawhud 0, which is not possible last I checked.

Sgt-Mess 01-22-2009 12:57

Re: [REQ]Force Disable HUD[CSS]
 
Quote:

Originally Posted by FlyingMongoose (Post 748009)
Not possible (afaik) it'd require forcing the cvar cl_drawhud 0, which is not possible last I checked.

Ok Thank you for replying.

L. Duke 01-22-2009 13:04

Re: [REQ]Force Disable HUD[CSS]
 
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 


Sgt-Mess 01-22-2009 14:05

Re: [REQ]Force Disable HUD[CSS]
 
Quote:

Originally Posted by L. Duke (Post 748172)
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.

FlyingMongoose 01-26-2009 07:01

Re: [REQ]Force Disable HUD[CSS]
 
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.

Sgt-Mess 01-26-2009 09:38

Re: [REQ]Force Disable HUD[CSS]
 
Quote:

Originally Posted by FlyingMongoose (Post 750357)
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.

CrimsonGT 01-26-2009 10:20

Re: [REQ]Force Disable HUD[CSS]
 
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);
}


Sgt-Mess 01-26-2009 11:31

Re: [REQ]Force Disable HUD[CSS]
 
Quote:

Originally Posted by CrimsonGT (Post 750435)
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.


All times are GMT -4. The time now is 05:20.

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