Raised This Month: $442 Target: $400
 110% 

Basic HP Left 1.2.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 11-29-2007 , 11:36   Basic HP Left 1.2.1
Reply With Quote #1

Basic HP Left 1.2.1
This is a somewhat simple plugin that, on your death, will display who killed you, with what, and how much HP that player had left. This gets displayed to chat, and can be re-displayed by typing "hp" in chat.

Installation
1. Place hp_left.smx in your plugins directory,
2. Put hp_left_weapons.txt in your sourcemod/configs directory,
3. Put hp_left.phrases.txt in your sourcemod/translations directory,
4. Change map and it should be loaded.

Changelog
1.0 - Release
1.1 - Stupid mistake fix
1.1.1 - Changed colors of playername to light green and changed the other information to the default mod color (CSS: Yellow, TF2: White).
- Removed the Distance part
- Fixed the Native "GetClientAbsOrigin" reported: Client index 0 is invalid bug.
1.1.2 - Fixed [SM] Native "GetClientHealth" reported: Client index 0 is invalid
1.1.3 - Fixed [SM] Native "IsClientConnected" reported: Client index 0 is invalid
1.1.4 - Fixed world detection and GetEventString 0 to a strlen (thanks EKS)
1.1.5 - Optmized code and changed a few things to make sure it wont break with source engine updates
- Added support for DIPRIP and Insurgency
- Compiled against SourceMod 1.2
1.2.0 - Added Multi language support including the option to change colors in the language file
- Added custom weapon name support through a simple .txt file in sourcemod/configs
1.2.1 - Changed color codes in translation file to make sure they actually work
- Changed lines to say "xx hp left"
1.2.1a - Added new hp_left_weapons file for i /sourcemod/configs to support more TF2 weapons

Credits:
Original version by Vir-Dan I basically just did some tweaking to it to make it look better and fixed the bugs plus added options and optimized the code.
Thanks to Flyingmongoose for helping me out with this one.
Thanks to Tsunami for helping out with some parts of the code.

Screenshot example:
In Counter-Strike: Source:


Mods Supported:
- Age of Chivalry
- Counter-Strike: Source
- Day of Defeat: Source
- DIPRIP
- Dystopia
- Empires
- Fistfull of frags
- Half Life 2 Deathmatch
- Insurgency
- PVK II
- Team Fortress 2
- Should work on all other Source engine games/mods except l4d.

If you want more then just a simple plugin for Sourcemod like this then you might want to checkout MiniStats for MetaMod: Source.

Want more statistics?

MiniStats is a MetaMod: Source plugin for Source engine based servers like CS:S, DOD:S and TF2 that provides the interactivity with HLStatsX ingame, gives extra logging required for hit detection and adds a feature called morestats to show damage stats to the player.

More info about this plugin over here.
Attached Files
File Type: smx hp_left.smx (4.1 KB, 660 views)
File Type: sp Get Plugin or Get Source (hp_left.sp - 1845 views - 3.1 KB)
File Type: txt hp_left.phrases.txt (371 Bytes, 920 views)
File Type: txt hp_left_weapons.txt (1.3 KB, 684 views)
__________________

Last edited by tcviper; 05-22-2009 at 07:21. Reason: Updated to 1.2.1
tcviper is offline
Send a message via MSN to tcviper
doa
Member
Join Date: Nov 2007
Old 11-29-2007 , 17:33   Re: Basic HP Left 1.1.1
Reply With Quote #2

Any plans to include who I manage to kill and injure before I died into this plugin?
doa is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-29-2007 , 21:22   Re: Basic HP Left 1.1.1
Reply With Quote #3

You should make it so it displays the actual weapon name, instead of what the mod describes it. Looking at your second screenshot, it says "tf_projectile_rocket" where you could change it to say "Rocket Launcher" or something.
bl4nk is offline
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 11-30-2007 , 03:18   Re: Basic HP Left 1.1.1
Reply With Quote #4

- That manage to kill could indeed be one line above this one, ill check it out.
- The updates of the names is possible but then it requires txt files per mod to specify the weapon names since right now i wanted to keep it as basic as possible (just like Vir-Dan) without needing to many extra's, ill think about it.
__________________
tcviper is offline
Send a message via MSN to tcviper
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-30-2007 , 03:21   Re: Basic HP Left 1.1.1
Reply With Quote #5

It wouldn't need an extra text file. Just a large section that checks to see if a string equals a weapon name, and then if it does, replace the string with the new name.
bl4nk is offline
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 12-01-2007 , 07:46   Re: Basic HP Left 1.1.2
Reply With Quote #6

Small update: 1.1.2 - Fixed [SM] Native "GetClientHealth" reported: Client index 0 is invalid
__________________
tcviper is offline
Send a message via MSN to tcviper
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 12-05-2007 , 10:09   Re: Basic HP Left 1.1.3
Reply With Quote #7

1.1.3: Fixed another small bug: Native "IsClientConnected" reported: Client index 0 is invalid.
__________________
tcviper is offline
Send a message via MSN to tcviper
TSCDan
Senior Member
Join Date: Jan 2005
Location: NY, USA
Old 12-05-2007 , 12:28   Re: Basic HP Left 1.1.3
Reply With Quote #8

Thanks viper, makes things easier for me
__________________
Dan o.O - connect dansbasement.us:27015

TSCDan is offline
Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 12-05-2007 , 13:03   Re: Basic HP Left 1.1.3
Reply With Quote #9

Haha, doing my best
__________________
tcviper is offline
Send a message via MSN to tcviper
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 12-08-2007 , 12:14   Re: Basic HP Left 1.1.4
Reply With Quote #10

Minor bug fix, thx to EKS.
__________________
tcviper is offline
Send a message via MSN to tcviper
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 17:46.


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