Raised This Month: $ Target: $400
 0% 

Damage reduction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 03-03-2013 , 13:42   Damage reduction
Reply With Quote #1

Is it possible to reduce the incoming damage via HAM FOR A SHORT PERIOD OF TIME (using set_task i guess). If yes how, provide an example please. I tried but didnt succeed...
Podarok is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 03-03-2013 , 14:28   Re: Damage reduction
Reply With Quote #2

A idea:

PHP Code:
public SetShieldTimeiPlayerFloatflTime )
{
    
g_flShieldTimeiPlayer ] = flTime get_gametime( );
}

public 
CPlayer__TakeDamageiVictimiInflictoriAttackerFloatflDamageiDamagebits )
{
    if( 
get_gametime( ) < g_flShieldTimeiVictim ] )
    {
        
SetHamParamFloat4flDamage 0.65 );
    }

Try to build something around.
__________________

Last edited by micapat; 03-03-2013 at 14:29.
micapat is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 03-04-2013 , 04:06   Re: Damage reduction
Reply With Quote #3

So damage is gonna be reduced by 35% right? The income damage will be 65%. Did i get it right?
Podarok is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 03-04-2013 , 07:26   Re: Damage reduction
Reply With Quote #4

Yes.
__________________
micapat is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-04-2013 , 08:08   Re: Damage reduction
Reply With Quote #5

You want this for specific players or for whole server during a specific time ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 03-04-2013 , 09:09   Re: Damage reduction
Reply With Quote #6

I want for a specific player.. I got the idea - im gonna try - not sure whether it works

Last edited by Podarok; 03-04-2013 at 09:10.
Podarok is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-04-2013 , 09:25   Re: Damage reduction
Reply With Quote #7

Then nyu's code is ok.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 21:48.


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