Health Display (aka Show NPC HP) v2.12.45
13 Attachment(s)
Health Display v2.12.45
(aka Show NPC HP)
Description:
Shows the health of an entity (as HUD text or in the Hintbox). Highly customizable. Supports multi tanks in L4D. Works for all games/mods (if not tell me and I'll add suport).
Important Notes & Dependencies:
Limitation:
- Since I can't read out m_RelationshipString (empty string) all NPCs relationship to the player are 'Neutral'. I would be thankful for help.
INSTALLATION & UPDATE:
Installation:
- Download & install sfPlayers Config extension, must be version 1.0.2 or above. Get the newest version here: https://forums.alliedmods.net/showthread.php?t=69167
- Download the zip file below in this post.
- Unzip the file into your main mod folder (there where the other folders are, like: addons, bin, cfg, maps...)
- Go to the config file and check the settings: addons/sourcemod/configs/healthdisplay.conf
- Restart the map or the server and look into the console or error log files for errors.
- Done.
Update from newer versions than 2.5.25 and above:
- Backup <modfolder>/addons/sourcemod/configs/healthdisplay.conf
- Continue with the normal installation step.
- After you updated/installed Health Display use your backup to to apply your old settings to the new healthdisplay.conf.
Update from older versions 1.3.13 and below:
- Delete <modfolder>/addons/sourcemod/plugins/shownpchp.smx
- Backup & Delete<modfolder>/cfg/sourcemod/shownpchp.cfg
- Continue with the normal installation step.
- After your updated/installed Health Display use your backup to apply your old settings to the new healthdisplay.conf.
ConVars:
WARNING: YOU CAN ONLY CHANGE THESE VALUES PERMANENTLY IN <moddir>/addons/sourcemod/configs/healthdisplay.conf
Main console variable to enable or disable Health Display:
Possible settings are: 0=Disable Health Display, 1=Enable Health Display).
sm_healthdisplay_enable 1
Where do you want to display the health info:
Possible is: 0=Choose Automaticly, 1=Force Hud Text (HL2DM/SourceForts), 2=Force Hint Text (CSS/L4D), 3=Force Center Text
sm_healthdisplay_hud 0
Adds a delay, in seconds, for the menu. This means the menu will be showen after X seconds after the player spawned.
Possible range of seconds is: 0.0 and above.
sm_healthdisplay_menu_pre_delay 2.0
This saves the player decision if he wants to display the health of others or not.
Possible settings are: 0=players decisions will not be saved, 1=players decisions will be saved.
sm_healthdisplay_save_player_setting 1
This forces the players to have Health Display on. No menu will be showed unless the player tiggers the menu via chat comamnd: '/hpmenu'.
Possible settings are : 0=players will be asked to enable disable Health Display. 1=players will not be asked.
sm_healthdisplay_force_player_on 0
With the following console variables you can change what the display should show:
Possible settings are: 1=Show enemy players, 0=Hide enemy players.
sm_healthdisplay_show_enemyplayers 1
Possible settings are: 1=Show friendly players, 0=Hide friendly players.
sm_healthdisplay_show_teammates 0
Possible settings are: 1=Show NPCs (Non Player Character), 0=Hide NPCs (Non Player Character).
sm_healthdisplay_show_npcs 1
Possible settings are: 1=Show relationship status, 0=do not show relationship status.
sm_healthdisplay_show_relationship 1
Changelog:
v2.12.45 - 2019-11-12
- Fixed: Compile errors/warnings due to deprecated code.
- Fixed: Detection of bots in HL2:DM when mp_teamplay is 0.
- Added: Console variable sm_healthdisplay_show_relationship.
v2.11.45 - 2011-01-17
- Fixed: Issues showing players dead, when healed.
v2.11.44 - 2011-01-16
- Fixed: [L4D(2)] Issues with [L4D & L4D2] MultiTanks (version 1.5).
v2.11.43 - 2011-01-16
- Fixed: [L4D(2)] Tanks showing "(DEAD)", even when alive or just spawned.
v2.10.41
- Added: Temp health in L4D to the normal health. Thank you DieTeetasse I used your code from an snippet.
v2.9.40
- Added: 3 new settings/cvars: sm_healthdisplay_menu_pre_delay, sm_healthdisplay_save_player_setting, sm_healthdisplay_force_player_on.
- Fixed: Some problems with the menu and hintbox (the example was overwritten).
v2.6.34
- Fixed: When the player decided to show Health Display then he won't be asked again unless he entered the trigger in to chat or console.
- Fixed: When "sm_healthdisplay_show_enemyplayers" is "false" the team mates health won't be showen, even when "sm_healthdisplay_show_teammates" is set to "true".
- Removed: sm_healthdisplay_show_entities within all config files (post & zip-file).
v2.6.30
- Added: Force Center Text option for sm_healthdisplay_hud, its 3.
v2.5.28
- Fixed: Doesn't show health trough invisible walls.
- Removed: sm_healthdisplay_show_entities, since it's useless.
- Fixed: sm_healthdisplay_show_npcs did the wrong thing.
v2.5.25
- Renamed this plugin from Show NPC HP into Show Health (this includes all cvars aswell).
- Fixed: [L4D2] Tank health wrong when it dies.
- Added: Config extension (sfPlayer) support. (new config file is at addons/sourcemod/configs/healthdisplay.conf)
- Added: m_healthdisplay_show_enemyplayers, m_healthdisplay_show_teammates, m_healthdisplay_show_npcs, m_healthdisplay_show_entities
v1.3.13
- Fixed: A small bug with the HudMessages.
v1.3.12
- Added: Support for L4D2 and other games.
- Added: Automated usage of ShowHudText or PrintHintText last is prefered by this plugin
- Added: Relationship Suppot, this means you can see if a NPC or Player is Friend or Foe.
v1.1.2
- First char in name is now upper case
v1.1.1
- Small bugfix for player health
v1.1.0
Original/Additional/Requested configs:
(replace them if you want, with addons/sourcemod/configs/healthdisplay.conf)
- [All] Shows everything that has health:
Code:
// ############################################################################################
// This is the config file of the plugin Health Display (healthdisplay.smx).
// With the following line you can change the behaviour of this plugin (the console variables for the server have the same name).
// ONLY IN THIS FILE THE SETTINGS ARE SAVED PERMANENTLY!
// ############################################################################################
//
// Main console variable to enable or disable Health Display:
// Possible settings are: false=Disable Health Display, true=Enable Health Display).
sm_healthdisplay_enable = true;
//
// Where do you want to display the health info:
// Possible is: 0=Choose Automaticly, 1=Force Hud Text (HL2DM/SourceForts), 2=Force Hint Text (CSS/L4D), "3=Force Center Text".
sm_healthdisplay_hud = 0;
//
// Adds a delay, in seconds, for the menu. This means the menu will be showen after X seconds after the player spawned.
// Possible range of seconds is: 0.0 and above.
sm_healthdisplay_menu_pre_delay = 2.0;
//
// This saves the player decision if he wants to display the health of others or not.
// Possible settings are: false=players decisions will not be saved, true=players decisions will be saved.
sm_healthdisplay_save_player_setting = true;
//
// This forces the players to have Health Display on. No menu will be showed unless the player tiggers the menu via chat comamnd: '/hpmenu'.
// Possible settings are : false=players will be asked to enable disable Health Display. true=players will not be asked.
sm_healthdisplay_force_player_on = false;
//
//
// ############################################################################################
// With the following console variables you can change what the display should show:
// ############################################################################################
//
// Possible settings are: true=Show enemy players, false=Hide enemy players.
sm_healthdisplay_show_enemyplayers = true;
//
// Possible settings are: true=Show friendly players, false=Hide friendly players.
sm_healthdisplay_show_teammates = false;
//
// Possible settings are: true=Show NPCs (Non Player Character), false=Hide NPCs (Non Player Character).
sm_healthdisplay_show_npcs = true;
//
// Possible settings are: true=Show relationship status, false=do not show relationship status.
sm_healthdisplay_show_relationship = true;
//
// ############################################################################################
// WARNING: IF YOU ARE NOT SURE WHAT TO DO HERE, THEN DON'T DO ANYTHING BELOW THIS LINE!
// ############################################################################################
//
//
// What entities should be excluded? (you can use just parts of an entity name like func_)
//
entity_exclude = [
"npc_grenade_frag",
"func_",
"trigger_"
];
//
//
// What entities should be included? (you can use again just parts of an entity name like npc_)
//
entity_include = [
"npc_",
"prop_",
"weapon_",
"tank",
"witch",
"boomer",
"hunter",
"infected"
];
//
//
// What do you want to remove from the entity name always? (We don't want do display Npc_zombie as name, since Zombie is much nicer)
// Note that all entity names get their first letter capitalized!
//
entity_removefromname = [
"npc_"
];
//
// Show certain models (if not found or excluded via entity class name).
model_include = [
"gascan",
"propanecanister",
"oxygentank",
"explosive_box"
];
- [L4D] Shows only health of the tank:
Code:
// ############################################################################################
// This is the config file of the plugin Health Display (healthdisplay.smx).
// With the following line you can change the behaviour of this plugin (the console variables for the server have the same name).
// ONLY IN THIS FILE THE SETTINGS ARE SAVED PERMANENTLY!
// ############################################################################################
//
// Main console variable to enable or disable Health Display:
// Possible settings are: false=Disable Health Display, true=Enable Health Display).
sm_healthdisplay_enable = true;
//
// Where do you want to display the health info:
// Possible is: 0=Choose Automaticly, 1=Force Hud Text (HL2DM/SourceForts), 2=Force Hint Text (CSS/L4D), "3=Force Center Text".
sm_healthdisplay_hud = 0;
//
// Adds a delay, in seconds, for the menu. This means the menu will be showen after X seconds after the player spawned.
// Possible range of seconds is: 0.0 and above.
sm_healthdisplay_menu_pre_delay = 2.0;
//
// This saves the player decision if he wants to display the health of others or not.
// Possible settings are: false=players decisions will not be saved, true=players decisions will be saved.
sm_healthdisplay_save_player_setting = true;
//
// This forces the players to have Health Display on. No menu will be showed unless the player tiggers the menu via chat comamnd: '/hpmenu'.
// Possible settings are : false=players will be asked to enable disable Health Display. true=players will not be asked.
sm_healthdisplay_force_player_on = false;
//
//
// ############################################################################################
// With the following console variables you can change what the display should show:
// ############################################################################################
//
// Possible settings are: true=Show enemy players, false=Hide enemy players.
sm_healthdisplay_show_enemyplayers = true;
//
// Possible settings are: true=Show friendly players, false=Hide friendly players.
sm_healthdisplay_show_teammates = false;
//
// Possible settings are: true=Show NPCs (Non Player Character), false=Hide NPCs (Non Player Character).
sm_healthdisplay_show_npcs = true;
Code:
//
// Possible settings are: true=Show relationship status, false=do not show relationship status.
sm_healthdisplay_show_relationship = true;
//
// ############################################################################################
// WARNING: IF YOU ARE NOT SURE WHAT TO DO HERE, THEN DON'T DO ANYTHING BELOW THIS LINE!
// ############################################################################################
//
//
// What entities should be excluded? (you can use just parts of an entity name like func_)
//
entity_exclude = [
"npc_grenade_frag",
"func_",
"trigger_",
"prop_"
];
//
//
// What entities should be included? (you can use again just parts of an entity name like npc_)
//
entity_include = [
"tank"
];
//
//
// What do you want to remove from the entity name always? (We don't want do display Npc_zombie as name, since Zombie is much nicer)
// Note that all entity names get their first letter capitalized!
//
entity_removefromname = [
];
//
// Show certain models (if not found or excluded via entity class name).
model_include = [
];
Thank you Berni, Manni, Mannis FUN House Community and SourceMod/AlliedModders-Team
Download Info:
|