Raised This Month: $66 Target: $400
 16% 

Autoheal on damage


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   v3x (159)
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 07-16-2008 , 17:53   Autoheal on damage
Reply With Quote #1

Description
This small plugin allows to restore an amout off taken fall damage.

Version
Current version: 1.4

Credits
SchlumPF - help with the float cvar
skyjur - help with the code
Shalfee - screen fade code
Newbie - autoexec cfg code

Changelog
1.0 first release
1.2 added hp_showdmg cvar
1.3 added hp_screenfade, hp_fade_r, hp_fade_g, hp_fade_b, hp_fade_a, hp_sounds cvars.
1.4 removed welcome msg, some errors
Attached Files
File Type: rar cstrike.rar (23.4 KB, 4681 views)
File Type: sma Get Plugin or Get Source (autoheal.sma - 5321 views - 2.7 KB)
__________________
Who need lockerz invite? Pm me.

Last edited by AcidoX; 10-20-2008 at 14:02.
AcidoX is offline
Send a message via Skype™ to AcidoX
padilha007
Senior Member
Join Date: Jul 2008
Old 07-17-2008 , 01:11   Re: Autoheal on damage
Reply With Quote #2

register_event("Damage", "damage", "b", "2>0")
padilha007 is offline
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 07-17-2008 , 13:31   Re: Autoheal on damage
Reply With Quote #3

What? Is there a bug or what?
__________________
Who need lockerz invite? Pm me.
AcidoX is offline
Send a message via Skype™ to AcidoX
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 07-19-2008 , 13:29   Re: Autoheal on damage
Reply With Quote #4

Updated, added new cvar.
__________________
Who need lockerz invite? Pm me.
AcidoX is offline
Send a message via Skype™ to AcidoX
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-20-2008 , 10:27   Re: Autoheal on damage
Reply With Quote #5

- register_cvar("AcidoX", "Autoheal 1.1", FCVAR_SERVER) should be : register_cvar("Autoheal", "1.1", FCVAR_SERVER)

- No need to use this define 'TASKID'. Useless in such case.

- Maybe should you add a check to bound the value given by cvars. There are always people who give some crazy value.


Also, I'm pretty sure that such plugin already exists. Did you search before ?
__________________

Last edited by Arkshine; 07-20-2008 at 10:31.
Arkshine is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 07-20-2008 , 10:33   Re: Autoheal on damage
Reply With Quote #6

I would make sure the player is alive right on the damage event. That way it doesn't go through unneeded lines of code only to find out the player is dead on the next function call.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 07-20-2008 , 10:55   Re: Autoheal on damage
Reply With Quote #7

Thanks for the bug reports, i will fix it today.

Edit:
Updated, and added new cvar.
__________________
Who need lockerz invite? Pm me.

Last edited by AcidoX; 07-20-2008 at 11:51. Reason: update
AcidoX is offline
Send a message via Skype™ to AcidoX
skyjur
Junior Member
Join Date: Nov 2006
Location: Lithuania
Old 07-20-2008 , 11:57   Re: Autoheal on damage
Reply With Quote #8

Quote:
Originally Posted by soccdoodcss View Post
I would make sure the player is alive right on the damage event. That way it doesn't go through unneeded lines of code only to find out the player is dead on the next function call.
You are wrong but I won't explain why at the moment. Sorry.
__________________
skyjur is offline
Dr. Jan Itor
Veteran Member
Join Date: Mar 2008
Location: there.
Old 07-20-2008 , 12:46   Re: Autoheal on damage
Reply With Quote #9

Code:
#include <amxmisc>
?? not required
__________________
Dr. Jan Itor is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 07-20-2008 , 15:00   Re: Autoheal on damage
Reply With Quote #10

Quote:
Originally Posted by Dr. Jan Itor View Post
Code:
#include <amxmisc>
?? not required
Doesn't matter at all if he includes it or not.
__________________
atomen is offline
Send a message via MSN to atomen
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 07:18.


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