SuperHero Monitor v1.5
Code:
****************************************************************************
* ******** AMX Mod X 1.80 and above Only ********
* ***** SuperHero Mod 1.2.0 and above Only ******
* *** Must be loaded after SuperHero Mod core ***
*
* Description:
* This plugin will display a hud message to the user showing their true
* current health and armor just above chat messages. Might possibly
* add other things into the message in the future, suggestions?
*
* Why:
* When a users health is over 255 in the HUD it loops over again
* starting from 0. When a users armor is over 999 it does not show the
* correct number rather it shows a hud symbol and the last few digits.
*
* Who:
* This plugin is intended for SuperHero Mod servers that have heroes that
* make it possible to have more then 255 hp or more then 999 armor.
*
* Known Issues:
* If using the REPLACE_HUD option, clients radar is also removed from the
* hud. If lots of hud messages are being displayed at the same time the
* monitor may flash briefly, but does not happen enough to be concerned.
*
****************************************************************************
*
* http://shero.rocks-hideout.com/
*
* Notes: Currently there are no cvars, message will not display when sh mod is off.
* However, loop will still run incase shmod is enabled again. Plugin tested
* at 800x600 to 1280x1024.
*
* Changelog:
* v1.5 - vittu - 10/28/10
* - Fixed possible issue with get_players array size.
*
* v1.4 - vittu - 10/19/09
* - Changed to make each item optional
* - Added option to show when godmode is on
* - Added option to show information of player being spectated (similar to wc3ft)
* (Update required use of SuperHero Mod 1.2.0 or above, also made the code ugly.)
*
* v1.3 - vittu - 07/06/07
* - Fixed bug forgot to make sure entity was valid in think forward
* - Added requested option to show Gravity and Speed, set as disabled define because it
* gets checked constantly
*
* v1.2 - vittu - 06/13/07
* - Conversion to Fakemeta
* - Optimization of code all around, much improved
*
* v1.1 - vittu - 06/11/06
* - Used a hud sync object instead of taking up a single hud channel (suggested by jtp10181)
* - Added option to remove the hud's hp/ap and place message there (suggested by Freecode)
*
* v1.0 - vittu - 06/05/06
* - Initial Release
*
* Thanks:
* - OneEyed for the basis of an entity as a task
*
****************************************************************************
Code:
/****** Changeable defines requie recompile *******/
/********* Uncomment to replace HUD hp/ap **********/
//#define REPLACE_HUD
/********* Uncomment the ones you want to display **********/
#define MONITOR_HP
#define MONITOR_AP
//#define MONITOR_GRAVITY
//#define MONITOR_SPEED
//#define MONITOR_GODMODE
#define MONITOR_SPEC