Raised This Month: $62 Target: $400
 15% 

Plugin: SuperHero Monitor - Shows True HP/AP on screen


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 06-06-2006 , 06:00   Plugin: SuperHero Monitor - Shows True HP/AP on screen
Reply With Quote #1

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
Attached Thumbnails
Click image for larger version

Name:	sh_monitor.jpg
Views:	3890
Size:	12.4 KB
ID:	8103   Click image for larger version

Name:	sh_monitor2.jpg
Views:	3637
Size:	32.8 KB
ID:	8446   Click image for larger version

Name:	sh_monitor3.jpg
Views:	2269
Size:	62.4 KB
ID:	52049  
Attached Files
File Type: sma Get Plugin or Get Source (sh_monitor.sma - 3311 views - 12.1 KB)

Last edited by vittu; 10-28-2010 at 22:26. Reason: Updated to Version 1.5
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
lumbsta
Veteran Member
Join Date: Jun 2006
Location: Germany
Old 06-06-2006 , 06:13  
Reply With Quote #2

This plugins is definitely useful! I've always been asked: Why don't I have 700hp???? Now, these annoying questions won't be asked again. THX vittu!
lumbsta is offline
Send a message via ICQ to lumbsta Send a message via MSN to lumbsta Send a message via Skype™ to lumbsta
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-06-2006 , 09:41  
Reply With Quote #3

ill browse through the code later... gj
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 06-06-2006 , 15:30  
Reply With Quote #4

Good idea vittu. What if you removed hp/ap from the hud and added your plugin as the hp/ap ?
Freecode is offline
The_One
Senior Member
Join Date: Jul 2005
Old 06-06-2006 , 16:28  
Reply With Quote #5

gj have alot of people saying "i havent got extra hp" lol very nice plugin
__________________
[img]http://img106.**************/img106/970/spidermancopy5yf.gif[/img]
The_One is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-06-2006 , 22:06  
Reply With Quote #6

only problem is that it sucks away a HUD channel. You should use a hud sync object so it will cause the least possible interference with other hud messages, with this it would always try to use an open hud channel first, then if they are all in use it would erase an existing message.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
infernal2
Member
Join Date: May 2006
Old 06-07-2006 , 08:38  
Reply With Quote #7

looks really good wuld be nice in other server, but in my serve max hp is 200 so i hawe no problems
__________________
[img]ftp://84.237.128.247/Infernal.jpg[/img]
infernal2 is offline
Send a message via MSN to infernal2
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 06-07-2006 , 10:11  
Reply With Quote #8

I like it
Good job vittu
__________________
Heroes
:+: Deadpool :+:
D o o m is offline
Jonathan Young
Member
Join Date: Oct 2004
Location: Las Vegas, Nevada
Old 06-09-2006 , 20:16  
Reply With Quote #9

Sounds good, i will install it on my server asap. Hope their are upgrades to this plugin to make it more neat.
__________________
Sincerely,
Jonathan Young
Jonathan Young is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 06-11-2006 , 06:29  
Reply With Quote #10

Upated: Using jtp's and freecode suggestions

Now requires: AMX Mod X 1.70 or above

Update Features:
  • Now uses a hud sync object as to interfere less with other hud messages. It will try to find an available hud channel. If one is not available it will overwrite one instead of constantly overwriting a single hud channel. Meaning it will try not to overwrite other hud messages now.
  • Now with optional replacement of Hud's AP/HP, to use this mode you must uncomment the define in the sma and recompile the plugin. *Warning: this mode also removes the Radar from the hud, as seen in the second image above.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
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 06:04.


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