AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic / General Chat (https://forums.alliedmods.net/forumdisplay.php?f=38)
-   -   Plugin: SuperHero Monitor - Shows True HP/AP on screen (https://forums.alliedmods.net/showthread.php?t=36540)

vittu 06-06-2006 05:00

Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
9 Attachment(s)
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


lumbsta 06-06-2006 05:13

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!

Emp` 06-06-2006 08:41

ill browse through the code later... gj

Freecode 06-06-2006 14:30

Good idea vittu. What if you removed hp/ap from the hud and added your plugin as the hp/ap ?

The_One 06-06-2006 15:28

gj have alot of people saying "i havent got extra hp" lol very nice plugin :wink:

jtp10181 06-06-2006 21:06

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.

infernal2 06-07-2006 07:38

looks really good wuld be nice in other server, but in my serve max hp is 200 so i hawe no problems :P

D o o m 06-07-2006 09:11

I like it :)
Good job vittu :)

Jonathan Young 06-09-2006 19:16

Sounds good, i will install it on my server asap. Hope their are upgrades to this plugin to make it more neat.

vittu 06-11-2006 05:29

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.

Freecode 06-11-2006 15:18

gj. i like it 8)

infernal2 06-13-2006 12:35

srry vittu removing radar sucks!!! is it possible u get it back on in futur updates?

jtp10181 06-13-2006 13:45

The radar is not removed by default. Only if you enable the option to remove the HP/AP on the HUD. There is no way to remove the HP/AP on the hud without removing the radar also.

netsurfer 06-26-2006 00:45

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Which modules are required to run this plugin?
Code:

Plugin uses an unknown function (name "ShowSyncHudMsg") - check your modules.ini

vittu 06-26-2006 01:49

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

Originally Posted by netsurfer
Which modules are required to run this plugin?
Code:

Plugin uses an unknown function (name "ShowSyncHudMsg") - check your modules.ini

******** AMX Mod X 1.70 and above Only ********

ShowSyncHudMsg is in the core module, your not running a high enough version of amxx. I'm about to make lots of heroes use this as well, so you should update. Or at least update when amxx 1.75 comes out.

Kiki-Jiki 07-18-2006 13:04

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
I got the same error, and I'm pretty sure I'm running AMX 1.60, so, if i need 1.70, how/where can I update? And would I have to like delete the old amxx and then re-install all the heroes and stuff, cause that would be a pain in the butt....

Jonathan Young 07-18-2006 15:20

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
This plugin won't wor for amxx 1.6, you have to upgrade, go to the amxx website (http://www.amxmodx.org/). I would suggest delete verything, keep your config files and sma files (on a different folder), then upload new amxx and copy all your configs over (settings only, not the actual files), then start the sma compile, then upload the compiled plugins to the plugins folder and your done.

Helpful guide: http://wiki.amxmodx.org/index.php/Upgrading_AMX_Mod_X

Kiki-Jiki 07-18-2006 15:34

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Ok, im going to try some of that. But how do I do a sma compile? I really don't know anything about compiling, so....is this going to screw me over?
Oh, and if I just copy all my configs over to the new amx thing, will that include SH mod, or will i have to re-install that?
-Sorry if I sound like a newb at this computer stuff.
I am.

Jonathan Young 07-18-2006 16:08

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
The shero folder will be the same, you can copy that over. Just click the exe or something file in the scripting folder and it will compile all your plugins in the folder.

Kiki-Jiki 07-18-2006 17:14

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Ok, im still confused on what to keep and stuff. Should I keep the whole configs folder? Or are there specific files I should keep? And where are the sma files I should keep?

EDIT:
Ok, so I kept the whole scripting folder and put all the sma files into there, and I see a .exe file that's title COMPILE, may I assume that that's what I need to compile? Ok, so anyways, what about the configs, what do I keep?

EDIT (again):
I just double-clicked the COMPILE.exe thing and it compiled all the sma's of the heros and stuff. So, did I do that right?

Jonathan Young 07-18-2006 17:36

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
If you go over the guide, you will be fine, keep the config files. The only file that has changed the sql.cfg, just overwrite it and if you use that to store things, then just change the settings, that's all that needs to be changed in configs. Now, overwrite everything, download all your heroes and plugin smas and compile them using other the 1.75a compiler or the web compiler, then upload all the amxx files to the plugins folder and then your done.

Kiki-Jiki 07-18-2006 17:42

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Wait, I have to download all my heros again?!
And am I supposed to delete everything in amxmodx folder or not?
I'm sorry, but I really am a noob...

EDIT:
OK, so I just replaced all the binaries and data/lang files, and stuff, as it says in the guide. But then it says I need metamod v 1.19, and I only have 1.18, how do I upgrade that?
EDIT: (again)
Alright, since I had already complied all the old sma's and stuff, is there anything left for me to do? And should I move the 1.75 scripting sma files (like Admin, adminvote, mapsmenu, nextmap, so on...) into the old scripting folder replacing the old ones?
Also, from www.amxmodx.org I downloaded the Amx 1.75 Base, and I downloaded the amx 1.75 Counter-Strike Addon, what do I do with the addon?

Jonathan Young 07-18-2006 17:54

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
To upgrade metamod, go to http://metamod.org/ and download it for your os (operating system). No, you don't need to download heroes again, they all should work, but its best to recompile them.

thebusdriver 07-19-2006 22:21

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
nice! I love this plugin

wild-kingdom 07-29-2006 21:50

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Omg i love this plugins just got install on my server. Now newbs won't ask me why my hp is 188 and not 700. Good job :D

g3x 09-30-2006 22:52

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
this is something that would not be put to waste

SasukeGolden 11-06-2006 18:32

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
gj , works well :)

gigabowzer 11-12-2006 03:00

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
how do u install this plugin

exelz 02-20-2007 02:59

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Can you make a code of that is not for sh?

vittu 02-20-2007 03:04

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Yea that's not hard to change.

What do you want in it? health and armor or only one of them? You want anything else in it?

And would this be ok for displaying:
[AMXX] HP # | AP #
or you want a different setup?

TRE 03-03-2007 01:21

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
what should i do with the sma file? please help?
should i do the same thing as installing the heros?

broWnie_maN 03-03-2007 06:27

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
yeah put it in your scripting folder and compile it... put the compiled file in ur plugins folder and add filename.amx(x) to ur plugins.ini

TaZZiii 05-06-2007 07:30

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Hey, could someone help me with this one ? i installed PLugin and source.

But i dont now where i shall write:
********************************************* *******************************
*
* ******** AMX Mod X 1.70 and above Only ********
*
* 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.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
*
********************************************* *******************************

TaZZiii 05-06-2007 07:31

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
where shall i write the code ?

broWnie_maN 05-06-2007 17:15

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
i dont think u need this... isnt this only description of what the plugin does ??

vittu 05-07-2007 04:18

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

Originally Posted by TaZZiii (Post 473981)
where shall i write the code ?

What code? If you mean cvars there are none, it simply runs when superhero does. There is no need for cvars with this really. Someone requested it to work without SH but they never answered my question so i never bothered, don't know if that is what you mean.

vittu 06-14-2007 17:23

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Updated mainly optimized with better methods, new version is recommended to anyone using older ones.

Code:

*  v1.2 - vittu - 06/13/07
*            - Conversion to Fakemeta
*          - Optimization of code all around, much improved


bordeaux 06-20-2007 01:48

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
oh finaly i can see the true hp :)
but why dont make it a anubis power?

vittu 06-20-2007 06:46

Re: Plugin: SuperHero Monitor - Shows True HP/AP on screen
 
Cause that would be stupid to require users to get a hero to see their actual health.

bordeaux 06-20-2007 08:41

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

Originally Posted by vittu (Post 492274)
Cause that would be stupid to require users to get a hero to see their actual health.

but it would make anubis better
and ppl would acualy pick him O.O'


All times are GMT -4. The time now is 23:16.

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