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

[L4D] Infected HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Durzel
Member
Join Date: Aug 2008
Plugin ID:
708
Plugin Version:
1.0.0.4
Plugin Category:
Statistical
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Provides info to the Infected team about the status of their teammates, how long left til they spawn, how long tank has left to live when on fire
    Unapprover:
    Reason for Unapproving:
    Unapproved per author's request, implemented by Valve
    Old 01-07-2009 , 05:29   [L4D] Infected HUD
    Reply With Quote #1

    Requires: SM 1.2+ (as it's for L4D)

    What it does:
    This plugin is designed to make it easier for those on the Infected team to work together without the current near total dependancy on teamspeak or checking the scoreboard every few seconds to see the status of your teammates. I figured since the survivors have a HUD, the Infected team should too.

    This plugin - when active - will present a HUD in the form of a menu (only way I could see of doing it without loads of information scrolling up the screen) which gives the current status of your teammates, specifically:
    • How much HP (%) they have
    • What class they're playing as
    • How much time (seconds) they have left until they spawn
    • Their status (Alive, Dead, Spawning)
    In addition - if you are playing as the Tank and you end up on fire it will tell you how long you have left before you die automatically from the flames.

    Configuration:
    There is no pre-configuration required, just install the plugin and it will be active when loaded.

    cvars:
    • infhud_version - tells you the current version of the plugin
    • infhud_enable - switches plugin on or off server-wide (0 = disabled, 1 = enabled)
    • infhud_announce - toggles whether plugin announces itself to clients that join the infected team
    Commands:
    Type !infhud during the game to toggle the HUD on (default) or off for yourself, for the duration of your time on the server.

    Version history:
    1.0.0.0 - Initial release
    1.0.0.1 - Removed "vote/menu active" debug message, modified cvar names as per plugin approval thread
    1.0.0.2 - Added client preference for showing HUD, cvar to toggle whether plugin announces itself to clients
    1.0.0.3 - Interim version released to testers
    1.0.0.4 -
    • HUD on/off setting is preserved across map changes for all clients.
    • Removed hard-coded infected HP values - the plugin will now correctly monitor the various cvars that control special infected HP and adjust the HUD HP % accordingly.
    • Tank burn duration no longer hard-coded (uses cvar)
    • Plugin will now detect what game mode (COOP or VERSUS) a server is running in and disable or enable itself accordingly.
    • Various bugfixes, timer optimisations & code cleanup

    Screenshot:




    TODO:
    • Optimisations (this is my first SourceMod - comments/suggestions welcome)
    • Customisable repositioning of HUD (not sure this is possible given how I am kludging a menu-panel to get it to work now)
    • (IDEA) Infected team "awards" at end of round - e.g. MVP, highest pounces, etc.
    Attached Files
    File Type: sp Get Plugin or Get Source (infhud.sp - 1924 views - 26.1 KB)

    Last edited by Durzel; 01-11-2009 at 16:36. Reason: Plugin update
    Durzel is offline
    bolinux
    Member
    Join Date: Jul 2007
    Old 01-07-2009 , 06:05   Re: [L4D] Infected HUD
    Reply With Quote #2

    (Note: This refers to an older version of the plugin. - gt)

    This plugin spaming the error-logs:

    Quote:
    L 01/04/2009 - 22:16:13: [SM] Plugin "infhud.smx" encountered error 23: Native detected error
    L 01/04/2009 - 22:16:13: [SM] Invalid data handle 0 (error 4) passed during timer end
    L 01/04/2009 - 22:16:13: [SM] Unable to call function "showInfHUD" due to above error(s).
    sm version
    SourceMod Version Information:
    SourceMod Version: 1.2.0-dev
    SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.2.0-dev)
    SourcePawn API: v1 = 4, v2 = 2
    Compiled on: Dec 31 2008 23:11:41
    Build ID: 2500:1925ae6cc888-dev
    http://www.sourcemod.net/

    Last edited by Greentryst; 01-09-2009 at 07:56.
    bolinux is offline
    Durzel
    Member
    Join Date: Aug 2008
    Old 01-07-2009 , 06:13   Re: [L4D] Infected HUD
    Reply With Quote #3

    Hm ok I'll look into this, thanks.

    Did that happen straight away? End of a round? End of a map?

    EDIT: I'm a bit confused.... I've just noticed your output is from the 4th January at 10:16pm+? Unless the clock is wrong on your server maybe you're running an older version? (I attached older versions of this plugin in a couple of places on the forum when I was looking for help). How could you be running this latest version 3 days before I made this thread?

    EDIT 2: Also, DelayedDmgUpdate is delayedDmgUpdate in version 1.0.0.0 as I noticed it wasn't the same naming convention as the other functions - you're using an older version of this plugin.

    Last edited by Durzel; 01-07-2009 at 06:35.
    Durzel is offline
    MrXorMrY
    Junior Member
    Join Date: Jan 2009
    Old 01-07-2009 , 06:24   Re: [L4D] Infected HUD
    Reply With Quote #4

    Can you make the HUD with diffrent colors?

    dead = red
    waiting for spawn = orange
    alive = green
    MrXorMrY is offline
    Durzel
    Member
    Join Date: Aug 2008
    Old 01-07-2009 , 06:29   Re: [L4D] Infected HUD
    Reply With Quote #5

    I looked into that but I've only got limited control over how the information is presented because it reuses the standard panel menu system in SourceMod. As far as I understand it there isn't any colour customisations possible with this.

    I tried doing what I thought were colour mods during development (\x04, etc) but they had no effect.
    Durzel is offline
    Lebson506th
    Veteran Member
    Join Date: Jul 2008
    Old 01-07-2009 , 07:13   Re: [L4D] Infected HUD
    Reply With Quote #6

    You have to start a string with \x01 to tell it you want to use colors.
    __________________
    My Plugins
    Spray Tracer by Nican, maintained by me
    Simple TK Manager
    DoD:S Admin Weapons

    Links
    Resistance and Liberation (A HL2 Multiplayer Modification)
    Lebson506th is offline
    Durzel
    Member
    Join Date: Aug 2008
    Old 01-07-2009 , 07:21   Re: [L4D] Infected HUD
    Reply With Quote #7

    Ah right, thanks! I'll look into whether or not this is possible with panels then - I know it is with regular chat/hint text.

    EDIT: Unfortunately \x01 - \x04 doesn't seem to work with panels.

    Last edited by Durzel; 01-07-2009 at 08:54.
    Durzel is offline
    MrXorMrY
    Junior Member
    Join Date: Jan 2009
    Old 01-07-2009 , 09:17   Re: [L4D] Infected HUD
    Reply With Quote #8

    i test the plu anf i think its very nice.
    the position from hut is not quite favorable. It overlaps with the infected hits.
    MrXorMrY is offline
    WiseOwl
    Junior Member
    Join Date: Jan 2009
    Old 01-07-2009 , 12:26   Re: [L4D] Infected HUD
    Reply With Quote #9

    Very nice plugin - one issue though, when i open the sm_admin menu the server gets spammed with a message saying something about infected hud cannot be shown due to admin menu. Not sure if there's a way to remove this error in a future version?
    WiseOwl is offline
    Durzel
    Member
    Join Date: Aug 2008
    Old 01-07-2009 , 12:39   Re: [L4D] Infected HUD
    Reply With Quote #10

    Quote:
    Originally Posted by WiseOwl View Post
    Very nice plugin - one issue though, when i open the sm_admin menu the server gets spammed with a message saying something about infected hud cannot be shown due to admin menu. Not sure if there's a way to remove this error in a future version?
    Well spotted, that was a stray debug message that I forgot to switch off (unless DEBUG enabled). I have fixed this and attached a new version.
    Durzel 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 21:22.


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