Raised This Month: $12 Target: $400
 3% 

[New] Cooldown Display - modded shnvault & heroes package


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
heliumdream
Senior Member
Join Date: Aug 2006
Old 08-29-2019 , 14:56   [New] Cooldown Display - modded shnvault & heroes package
Reply With Quote #1

Found this superhero package maintained by landfall / ibiruai:
https://github.com/ibiruai/cstrike-s...master/cstrike

It had a really cool cooldown implementation, that I expanded to included every hero with a relevant cooldown on my server. Putting it back out there for anyone else who might benefit from it. Enjoy!

I changed the handling inside the shnvault to make the most of the 64 character display limit for the HUD message. It dynamically responds to heroes presses and changes into a cooldown area now. It's pretty slick!

Check out the Cooldown Display, live on the server in my sig below:

https://github.com/heliumdream/db-cs1.6-superheroes

Supported Heroes:
Code:
sh_GokuKT.sma
sh_SuperVegeta.sma
sh_bishop.sma
sh_blink.sma
sh_bomberman.sma
sh_danimothx.sma
sh_dazzler.sma
sh_electro.sma
sh_exodus.sma
sh_forge.sma
sh_frieza.sma
sh_hulk.sma
sh_ken.sma
sh_longshot.sma
sh_naruto_scj_pub.sma
sh_neoreloaded.sma
sh_phasing.sma
sh_quicksilver.sma
sh_sandman.sma
sh_secretary.sma
sh_shadow.sma	
sh_ssjgohan.sma
sh_storm.sma
sh_subzero.sma
sh_yoda.sma
sh_yuna.sma
*Notes:
my shnvault is additionally modded to support SH Show Damage Anubis, and my custom version of Protoman // ibiruai's shnvault also has additional modifications, and has #defines that clearly outline the mods - his code is certainly cleaner.
they were both authored to support specific gameplay and features we wanted in our respective servers. they arent quite the same, so examine them closely to figure out what they even offer and if you want to bother implementing anything for yourself.

This was super bouillabaisse, I barely got around to making this update, so there's no good changelog, documentation, or the like. A couple comments might be here and there making sense of things. Good luck!
__________________

Last edited by heliumdream; 08-31-2019 at 10:23.
heliumdream is offline
heliumdream
Senior Member
Join Date: Aug 2006
Old 08-30-2019 , 10:45   Re: [New] Cooldown Display - modded shnvault & heroes package
Reply With Quote #2

Second Note:

This framework can work with additional cooldown heroes not on the list, but requires updating and modifying the hero itself to include a global array variable that gets keyed with players ids and stores game_time stamps, this informs the modded nvault package about when a player pushed which hero. I would suggest checking a hero with Cooldown Display already implemented to ensure you do it correctly.

You then also need to be sure to further modify and edit the nvault package in several places, setting up variables for your newly supported hero, a forward, and adding the new heroes variables to the else if checks inside the displayPowers function (starts line 2802)

Again, good luck!

---

Third Note:

I noticed if you run bots, occasionally they have strange ids, well outside the expected range. This causes all kinds of heroes to throw console errors, virtually all related to unexpected ids.
I patched every hero where this was occurring, by adding a check to see if the is user is connected...
Code:
if ( !shModActive() || !is_user_alive(id) || !is_user_connected(id)) return
I believe bots aren't connected, so checking their connected status prevents them from passing their bad ids into the hero functions.
I haven't extensively tested these changes, it has sured up the console errors, but I'm not certain if doing this has broken anything else...

I only recently added bots, and know I had very stable code that wasn't throwing errors previous to adding bots...so I went to some lengths to get the console back to stable.
__________________

Last edited by heliumdream; 08-31-2019 at 10:16.
heliumdream is offline
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 20:44.


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