Raised This Month: $154 Target: $400
 38% 

Show Health (1.0.2)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Plugin ID:
799
Plugin Version:
1.0.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    44 
    Plugin Description:
    Shows your health on the screen
    Old 03-06-2009 , 06:39   Show Health (1.0.2)
    Reply With Quote #1

    Show Health
    Version: 1.0.2


    [IMG]http://img196.**************/img196/4317/about1q.jpg[/IMG] Description:

    Shows your health on the screen. Can be usefull on ZombieMod servers to show zombie's large health.
    Servers running this plugin.


    Requirements:[IMG]http://img38.**************/img38/3856/install3.png[/IMG] Installation:
    1. Put the showhealth.smx into addons/sourcemod/plugins folder.
    2. Put the showhealth.phrases.txt into addons/sourcemod/translations folder.
    3. Start your server. Config file will be automatically generated.
    4. Configure plugin.showhealth.cfg in cfg/sourcemod folder and restart your server.
    [IMG]http://img20.**************/img20/2184/settings3.png[/IMG] Settings:
    Quote:
    • sm_show_health
      default: 1
      Enabled/Disabled show health functionality, 0 = off/1 = on
    • sm_show_health_on_hit_only
      default: 1
      Defines the whether when to show a health text:
      0 = always show your health on a screen
      1 = show your health only when somebody hit you
    • sm_show_health_text_area
      default: 1
      Defines the area for health text:
      1 = in the hint text area
      2 = in the center of the screen
    [IMG]http://img30.**************/img30/5649/lang2.jpg[/IMG] Supported Languages:
    • English
    • Russian

    [IMG]http://img269.**************/img269/2707/screenshot2j.png[/IMG] Screenshot:
    [IMG]http://img12.**************/img12/3028/hl22009032018541893.jpg[/IMG]

    [IMG]http://img38.**************/img38/4548/changelog1.png[/IMG] Changelog:
    • 1.0.2
      • Players now can switch plugin on/off through the !settings menu
      • Added translations
    • 1.0.1
      • Minor code changes for better performance
      • Added config file
    • 1.0.0
      • Initial Release

    Credits: SourceMod Developers, Antithasys.
    Attached Files
    File Type: txt showhealth.phrases.txt (306 Bytes, 1783 views)
    File Type: sp Get Plugin or Get Source (showhealth.sp - 3013 views - 4.9 KB)
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by asherkin; 06-06-2012 at 07:05.
    exvel is offline
    Send a message via ICQ to exvel
    crazyeffect
    Veteran Member
    Join Date: Jul 2008
    Location: Belgium
    Old 03-06-2009 , 11:25   Re: Show Health v1.0.0
    Reply With Quote #2

    Cool
    __________________
    crazyeffect is offline
    Send a message via MSN to crazyeffect
    {7~11} TROLL
    Senior Member
    Join Date: Oct 2008
    Location: Atlanta,Georgia
    Old 03-06-2009 , 16:40   Re: Show Health v1.0.0
    Reply With Quote #3

    any support for l4d in the future? would love to use it on there
    __________________
    {7~11} TROLL is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 03-06-2009 , 18:16   Re: Show Health v1.0.0
    Reply With Quote #4

    Few suggestions:
    • Use MaxClients instead of setting a global with GetMaxClients() on map load.
    • Hook the change of your cvars with HookConVarChange()
    • Call AutoExecConfig(true, "plugin.showhealth") to create and load your convars in a .cfg file
    • Use FCVAR_DONTRECORD on your public cvar so its not written to the .cfg file.
    • Use OnConfigsExecuted() to load some globals for your convars
    • Use your globals instead of GetConVarBool() and GetConVarInt() in your timer callback.

    The reason for these suggestions is because you don't really want to have to query the convar every 2 seconds in your timer call back for each client. There are times when code like this is better, but being used in a repeating timer is not one of them. Additionally, loading your convars into your own config file makes it very easy for a server admin to set the settings.

    Lastly, if your plugin had a lot of support files and such a .zip file would be better. Since you only have the plugin itself, and it can be compiled on the forums, please upload only the .sp file.

    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 03-06-2009 at 18:33.
    Antithasys is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 03-07-2009 , 04:00   Re: Show Health v1.0.0
    Reply With Quote #5

    Antithasys, these are good suggestions. I knew about all of these but I was too lazy to optimize code in such way for such simple plugin. If you think it is necessary, I just will rewrite it when I will have a free time.
    p.s. do you think AutoExecConfig is needed for only a 3 cvars that actualy can be left by default?
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by exvel; 03-07-2009 at 04:05.
    exvel is offline
    Send a message via ICQ to exvel
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 03-07-2009 , 04:02   Re: Show Health v1.0.0
    Reply With Quote #6

    Quote:
    Originally Posted by {7~11} TROLL View Post
    any support for l4d in the future? would love to use it on there
    Plugin should work in l4d. Are you having any problems with it?
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by exvel; 04-19-2009 at 07:01.
    exvel is offline
    Send a message via ICQ to exvel
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 03-07-2009 , 09:03   Re: Show Health v1.0.1
    Reply With Quote #7

    1.0.1
    • Minor code changes for better performance
    • Added config file
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by exvel; 03-08-2009 at 12:15.
    exvel is offline
    Send a message via ICQ to exvel
    {7~11} TROLL
    Senior Member
    Join Date: Oct 2008
    Location: Atlanta,Georgia
    Old 03-07-2009 , 10:53   Re: Show Health v1.0.1
    Reply With Quote #8

    gonna install this today +karama good work bro
    __________________
    {7~11} TROLL is offline
    antihacker
    Member
    Join Date: Feb 2009
    Old 03-07-2009 , 10:55   Re: Show Health v1.0.1
    Reply With Quote #9

    It works in left 4 dead, nearly perfect, just if i use the mode sm_show_health_text_are with 2, the text is so small, that its not really good to read.
    antihacker is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 03-07-2009 , 11:53   Re: Show Health v1.0.1
    Reply With Quote #10

    Quote:
    Originally Posted by antihacker View Post
    It works in left 4 dead, nearly perfect, just if i use the mode sm_show_health_text_are with 2, the text is so small, that its not really good to read.
    Sorry but this is a defect of l4d HUD that can't be changed.
    __________________
    For admins: My plugins

    For developers: Colors library
    exvel is offline
    Send a message via ICQ to exvel
    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 02:48.


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