Raised This Month: $213 Target: $400
 53% 

[L4D2] minimal HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author
greenlemonade
Member
Join Date: Jul 2010
Plugin ID:
1861
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Effects all players. Character health on the HUD is hidden. (hidehud 64)
    Old 08-05-2010 , 13:24   [L4D2] minimal HUD
    Reply With Quote #1

    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.
    Attached Files
    File Type: smx hidehud.smx (2.8 KB, 568 views)
    File Type: sp Get Plugin or Get Source (hidehud.sp - 1979 views - 1.7 KB)

    Last edited by greenlemonade; 03-24-2011 at 13:13.
    greenlemonade is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 08-05-2010 , 14:11   Re: [L4D2]minimal HUD
    Reply With Quote #2

    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.
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 08-05-2010 , 14:23   Re: [L4D2]minimal HUD
    Reply With Quote #3

    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.
    dirka_dirka is offline
    Damizean
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-05-2010 , 15:34   Re: [L4D2]minimal HUD
    Reply With Quote #4

    Quote:
    Originally Posted by dirka_dirka View Post
    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.
    I heard IsClientInGame returned fake positives sometimes, though.
    __________________
    Dat annoying guy
    Damizean is offline
    Send a message via AIM to Damizean Send a message via MSN to Damizean
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 08-05-2010 , 18:38   Re: [L4D2]minimal HUD
    Reply With Quote #5

    if its returning fake positives - its a bug and you should report it.. either that or just use isclientconnected and not both.
    dirka_dirka is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 08-05-2010 , 21:06   Re: [L4D2]minimal HUD
    Reply With Quote #6

    And may I ask why you are using OnGameFrame()? You should just set this for each client on OnClientAuthorized(client)
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    greenlemonade
    Member
    Join Date: Jul 2010
    Old 08-05-2010 , 21:23   Re: [L4D2]minimal HUD
    Reply With Quote #7

    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.?
    greenlemonade is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 08-05-2010 , 21:37   Re: [L4D2]minimal HUD
    Reply With Quote #8

    I'd be happy to revise it for you.

    Edit: revised version attached, look through source for cvars.
    Attached Files
    File Type: sp Get Plugin or Get Source (hidehud.sp - 829 views - 1.2 KB)
    __________________

    Last edited by McFlurry; 08-05-2010 at 21:50.
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    panxiaohai
    Senior Member
    Join Date: Mar 2010
    Old 08-05-2010 , 21:56   Re: [L4D2]minimal HUD
    Reply With Quote #9

    Just set hud when player spawn.
    panxiaohai is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 08-05-2010 , 23:21   Re: [L4D2]minimal HUD
    Reply With Quote #10

    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.
    dirka_dirka 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 00:27.


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