Raised This Month: $32 Target: $400
 8% 

Autoheal on damage


Post New Thread Reply   
 
Thread Tools Display Modes
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 10-20-2008 , 14:20   Re: Autoheal on damage
Reply With Quote #21

anakin_cstrike i will remake the whole plugin when i only have time
__________________
Who need lockerz invite? Pm me.
AcidoX is offline
Send a message via Skype™ to AcidoX
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 10-20-2008 , 15:49   Re: Autoheal on damage
Reply With Quote #22

Quote:
Originally Posted by AcidoX View Post
anakin_cstrike i will remake the whole plugin when i only have time
Eh...i know what you mean...
__________________

anakin_cstrike is offline
tossy
New Member
Join Date: Oct 2009
Old 11-22-2009 , 09:36   Re: Autoheal on damage
Reply With Quote #23

ty for plugin downloaded
tossy is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2009 , 09:43   Re: Autoheal on damage
Reply With Quote #24

You may consider this plugin instead : http://forums.alliedmods.net/showthread.php?p=702749
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 11-25-2009 , 08:42   Re: Autoheal on damage
Reply With Quote #25

It's for hns...
__________________
Who need lockerz invite? Pm me.
AcidoX is offline
Send a message via Skype™ to AcidoX
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-12-2010 , 11:19   Re: Autoheal on damage
Reply With Quote #26


PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

const TASKID 36484;

new const 
VERSION[] = "1.1";

new 
g_pRegenAmount
new 
g_pRegenDelay
new 
g_pShowDamage;
new 
g_pScreenFade;
new 
g_pColor;

new 
Float:plrHP33 ];

new 
plrHeal33 ];
new 
g_iMsgScreenFade;
new 
bool:g_bIsFlashed33 ];

public 
plugin_init( ) 
{
    
register_plugin"Autoheal on Fall Damage"VERSION"AcidoX & Juice" );
    
    
g_pRegenAmount     register_cvar"hp_regen""60" );
    
g_pRegenDelay     register_cvar"hp_delay""0.5" );
    
g_pShowDamage     register_cvar"hp_showdamage""1" );
    
g_pScreenFade     register_cvar"hp_fade""1" );
    
g_pColor     register_cvar"hp_color""255 0 0 65" );
    
    
register_event"ScreenFade""FlashedEvent""be""4=255""5=255""6=255""7>199" );
    
RegisterHamHam_TakeDamage"player""Ham_TakeDamage_Post" );
    
    
g_iMsgScreenFade get_user_msgid"ScreenFade" );
}

public 
FlashedEventiClient )
{
    
g_bIsFlashediClient ] = true;
    
set_task4.0"TaskRemoveFlashed"iClient );
    return 
PLUGIN_HANDLED;
}

public 
Ham_TakeDamage_PostiVictimiInflictoriAttackerFloat:flDamageiDamageBits 
{
    if( 
peviVictimpev_takedamage ) == 0.0 ) return HAM_IGNORED// GodMode Check
    
if( iDamageBits DMG_FALL 
    {    
        new 
flHealth peviVictimpev_health );
        
plrHPiVictim ] = float(flHealth);
        new 
Color24 ], Red], Green], Blue], Alpha];
        
get_pcvar_stringg_pColorColor23 );
        
parseColorRed3Green3Blue3Alpha); 
    
        new 
iRed str_to_numRed );
        new 
iGreen str_to_numGreen );
        new 
iBlue str_to_numBlue );
        new 
iAlpha str_to_numAlpha );

        if( ( 
get_pcvar_numg_pShowDamage ) ) && flDamage flHealth 
        {
            new 
szMsg32 ];
            
formatexszMsg31"Damage: %i"floatroundflDamagefloatround_floor ) );
            
set_hudmessageiRediGreeniBlue0.050.902.02.00.2 );
            
show_hudmessageiVictimszMsg );
        }
        
        
plrHealiVictim ] += flDamage;
        
        if( !
task_existsTASKID iVictim ) )
        {
            
set_taskget_pcvar_floatg_pRegenDelay ), "TaskHeal"iVictim TASKID );
        
            if( !
g_bIsFlashediVictim ] && ( get_pcvar_numg_pScreenFade ) ) && ( flDamage flHealth ) ) 
            {
                
message_beginMSG_ONEg_iMsgScreenFade_iVictim );
                
write_short1<<10 );
                
write_short1<<10 );
                
write_short0x0000 );
                
write_byteiRed );
                
write_byteiGreen );
                
write_byteiBlue );
                
write_byteiAlpha );
                
message_end( );
            }
        }
    }
    return 
HAM_IGNORED;
}

public 
TaskRemoveFlashediClient )
{
    
g_bIsFlashediClient ] = false;
}

public 
TaskHealiClient )
{
    
iClient -= TASKID;
    
    if( 
plrHealiClient ] == 
    {
        return;
    }
    else if( !
is_user_aliveiClient ) )
    {
        
plrHealiClient ] = 0;
        return;
    }
    
    new 
reg get_pcvar_numg_pRegenAmount );
    new 
hp peviClientpev_health );
    
    
plrHealiClient ] > reg ? ( plrHealiClient ] = reg ) : 0;

    
set_peviClientpev_health, ( hp plrHealiClient ] > plrHPiClient ] ) ? plrHPiClient ] : floathp plrHealiClient ] ) );
    
    
plrHealiClient ] = 0;
    return;


Last edited by lazarev; 04-12-2010 at 12:08.
lazarev is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 04-12-2010 , 11:40   Re: Autoheal on damage
Reply With Quote #27

Description of the difference?
KadiR is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-12-2010 , 12:07   Re: Autoheal on damage
Reply With Quote #28

Quote:
Originally Posted by KadiR View Post
Description of the difference?
  1. Changed hp_fade_[r/g/b] to hp_color < red green blue alpha >
  2. "Fixed" a bug while you flashed and get screen fade on falldmg( kinda noflash )
  3. Removed sounds.
  4. Using HamSandwich module to hook fall damage. Added godmode check
  5. Removed config execute.
  6. tsk_heal(id) got some changes.
lazarev is offline
ijam_j
Member
Join Date: Mar 2007
Old 10-03-2011 , 03:51   Re: Autoheal on damage
Reply With Quote #29

is this autoheal on damage or autoheal on FALL damage?
ijam_j is offline
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 06-13-2012 , 05:42   Re: Autoheal on damage
Reply With Quote #30

This plugin not works for me,why?I try v1.4,the last and nothing.
smiley92 is offline
Reply



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 23:42.


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