[L4D2] minimal HUD
2 Attachment(s)
My first plugin. Very simple. Very short.
It hides the health display of all players who join server. Spectators and Infected are unaffected. Cvars: // Hide health on the HUD of all players // - // Default: "1" l4d2_hudhider_enable "1" // Which game modes to enable Hud Hider // - // Default: "realism,teamversus,coop,mutation8,mutation12 " l4d2_hudhider_modes "realism,teamversus,coop,mutation8,mutation12 " Special thanks to McFlurry for showing me the ropes. I tried making a feature that hid the entire HUD but this is currently not possible without requiring clients to bind keys to switch weapons and I don't want to mess with that and ruin a good thing. 3/24/2011 Update. Fixed the "client no in game" error. smx below is up to date. |
Re: [L4D2]minimal HUD
any reason you attached a compiled version?
also: you are missing the Plugin:myinfo part and you dont have a version cvar. and as a suggestion while you are at it: add a enable/disable cvar. |
Re: [L4D2]minimal HUD
you need the first 2 if your "releasing" a plugin
as has been mentioned 100000000000000001 times on these forums, you dont need IsClientConnected(i) && IsClientInGame(i) if ingame then connected is already true. |
Re: [L4D2]minimal HUD
Quote:
|
Re: [L4D2]minimal HUD
if its returning fake positives - its a bug and you should report it.. either that or just use isclientconnected and not both.
|
Re: [L4D2]minimal HUD
And may I ask why you are using OnGameFrame()? :nono: You should just set this for each client on OnClientAuthorized(client)
|
Re: [L4D2]minimal HUD
My reasoning is I know nothing about Sourcemod plugins. Thanks for all your input. I'd like to learn.
I threw this together and was surprised that it actually worked after the 3rd time. I suggested the minimal HUD plugin on forum and searched the internet for a day to see if it existed. Would anyone be interested in taking the source material and sending me a revised version with a on off cvar ect.? |
Re: [L4D2]minimal HUD
1 Attachment(s)
I'd be happy to revise it for you.
Edit: revised version attached, look through source for cvars. |
Re: [L4D2]minimal HUD
Just set hud when player spawn.
|
Re: [L4D2]minimal HUD
actually.. ongameframe is a good place to set it.
otherwise theres nothing preventing the player from turning the hud back on.. just like in an old version of blind luck (which uses the exact same command) sometimes the hud wouldnt come back on - so you had to do it manually. i guess he could do it on a timer every .1 seconds to save a few frames.. but either way, it should be constantly re-applied. |
Re: [L4D2]minimal HUD
How would you execute SetEntProp through console?
|
Re: [L4D2]minimal HUD
you use the command hidehud 0
|
Re: [L4D2]minimal HUD
Shortest plugin I ever saw <3 10 lines
|
Re: [L4D2]minimal HUD
Isn't hidehud a cheat command, I just tried using it.
|
Re: [L4D2]minimal HUD
yes it is.. but either hidehud 0 isnt.. or hidehud 0 is ok when your hud is changed. i went thru this quite a bit back in l4d1 when blind luck was breaking the hud
|
Re: [L4D2]minimal HUD
Does this hide everything because this would be great for filming... Maybe a screenie?
|
Re: [L4D2]minimal HUD
it hides the same stuff that blind luck does - which is not everything. if you hide everything, you can only change weapons with the keys they are bound to (1,2,3,4).
|
Re: [L4D2]minimal HUD
I wrote the exact same thing for a friend recently and also tried to get it to hide the scoreboard for extra realism, apparently from the responses in the IRC you cannot hide the scoreboard no matter what =/.
I suggest you use the value 345 for the m_iHideHUD as it will hide the weapon selector and crosshair as well and also leave the chat box open. |
Re: [L4D2]minimal HUD
First, Thanks McFlurry. When this Plugin is polished, you'll be in credits.
2nd. I like the idea of making a timer. It need not be .1 seconds. It could be ever 20 seconds even. I think that would solve the performance issue. I however am clueless. Here is the code. Can someone please tell me how to change it from on frame to every 20 seconds? It has to apply to ALL players on server. #pragma semicolon 1 #include <sourcemod> #define PLUGIN_VERSION "1.0" new Handle:Enable; new Handle:Modes; public Plugin:myinfo = { name = "[L4D & L4D2] Hud Hider", author = "greenlemonade/Edited by McFlurry", description = "Removes HUD of players.", version = PLUGIN_VERSION, url = "N/A" } public OnPluginStart() { CreateConVar("l4d2_hudhider_version", PLUGIN_VERSION, "Hud Hider version", FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_DONTRECORD|FC VAR_REPLICATED); Enable = CreateConVar("l4d2_hudhider_enable", "1", "Hud Hider enable?", FCVAR_PLUGIN); Modes = CreateConVar("l4d2_hudhider_modes", "realism,teamversus", "Which game modes to enable Hud Hider", FCVAR_PLUGIN); } stock bool:IsAllowedGameMode() { decl String:gamemode[24], String:gamemodeactive[64]; GetConVarString(FindConVar("mp_gamemode"), gamemode, sizeof(gamemode)); GetConVarString(Modes, gamemodeactive, sizeof(gamemodeactive)); return (StrContains(gamemodeactive, gamemode) != -1); } public OnClientAuthorized(client, const String:auth[]) { if(IsAllowedGameMode() && GetConVarInt(Enable) == 1) { if(IsClientConnected(client) && !IsFakeClient(client)) { SetEntProp(client, Prop_Send, "m_iHideHUD", 64); } } } |
Re: [L4D2]minimal HUD
Cliffhanger,
I'm not a fan of 345 as it hides the crosshair. I dont think its very realistic because there are no iron sights in L4D. I think it also disables weapon select and crashes client if they open MOTD. Im not sure of this. |
Re: [L4D2]minimal HUD
2 Attachment(s)
Reworked my version which didn't seem to be working at all. Now uses 5 second timer.
|
Re: [L4D2]minimal HUD
how to disable the crosshair?
|
Re: [L4D2]minimal HUD
I can't use hidehud on my game either. It says cheat protected.
|
Re: [L4D2]minimal HUD
Quote:
Quote:
|
Re: [L4D2]minimal HUD
can u help me rework one to disable the crosshair and the hud =D
|
Re: [L4D2]minimal HUD
Download mcfluries Plugin (the source).
Open it with: http://download.cnet.com/Notepad/300...-10327521.html Replace all instances of "hidehud 64" with "hidehud 345" Then "compile" the source code into a plugin using this: http://www.sourcemod.net/compiler.php |
Re: [L4D2]minimal HUD
McFlurry,
Great job with the plugin. However? why have you limited it to Realism? I actually use it on Campaign on my server. My reasoning is I'm making an ultra realism mod and I dont think the damage resistance in Realism is at all realistic. The zombies are human and getting shot in the heart with a sniper rifle should kill just about anyone. Also, I feel Expert Realism has serious balance issues. Like the Magnum is stronger than just about any primary weapon. In real life, the Desert Eagle is a very poor weapon. Its just fun. That's what it was designed for and thats why no military uses it. :) |
Re: [L4D2]minimal HUD
I included a modes cvar l4d2_hudhider_modes
Change it to coop,etc |
Re: [L4D2] minimal HUD
Can you upload the .SP File please? :|
|
Re: [L4D2] minimal HUD
I have a problem....while hiding the hud this also hides my sm_admin commands. I cant see them, i can press the 1,2,3,4 buttons but i dont see the sm_admin menu. Is there any way to fix that?
|
Re: [L4D2] minimal HUD
I really wish there was a way that this could only hide the floating blue player names and nothing else.
|
Re: [L4D2] minimal HUD
as do I. There is really only one way to do that and that is adding
sm_cvar sv_disable_glow_survivors 1 to your server config. |
Re: [L4D2] minimal HUD
Quote:
|
Re: [L4D2] minimal HUD
hud_targetid_name_height 9999
|
Re: [L4D2] minimal HUD
There should be a function in this plugin that restores the hud for an admin who has activated his or her admin list, and then removes it again when they zero out of it.
|
Re: [L4D2] minimal HUD
Quote:
|
Re: [L4D2] minimal HUD
Well there. Its been forever, but the plugin is updated to not error out when people leave server on multi.
We've tested this plugin and its quite fun. :) |
All times are GMT -4. The time now is 01:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.