AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage reduction (https://forums.alliedmods.net/showthread.php?t=209903)

Podarok 03-03-2013 13:42

Damage reduction
 
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...

micapat 03-03-2013 14:28

Re: Damage reduction
 
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.

Podarok 03-04-2013 04:06

Re: Damage reduction
 
So damage is gonna be reduced by 35% right? The income damage will be 65%. Did i get it right?

micapat 03-04-2013 07:26

Re: Damage reduction
 
Yes.

ConnorMcLeod 03-04-2013 08:08

Re: Damage reduction
 
You want this for specific players or for whole server during a specific time ?

Podarok 03-04-2013 09:09

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

ConnorMcLeod 03-04-2013 09:25

Re: Damage reduction
 
Then nyu's code is ok.


All times are GMT -4. The time now is 21:48.

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