Onplayerdeath and afk kill
#1

Hello, i have a question, on my server is a one bug he is: Player death received x4 or x5 message...
This is my onplayergivedamage.
I need kill afk player
PHP код:
public OnPlayerGiveDamage playeriddamagedidFloatamountweaponid )
{
    if ( 
damagedid == INVALID_PLAYER_ID ) return 1;
    new
        
FloatHP,
        
FloatAP
    
;
    
GetPlayerHealth damagedidHP );
    
GetPlayerArmour damagedidAP );
    if ( 
AP >= amount )
    {
        
SetPlayerArmour damagedidAP amount );
    }
    else if ( 
AP <= )
    {
        new const 
FloatremainHP HP amount;
        
SetPlayerHealth damagedidremainHP );
        if ( 
remainHP <= OnPlayerDeath damagedidplayeridweaponid );
    }
    else
    {
        new const 
FloatremainHP HP + ( AP amount );
        
SetPlayerArmour damagedid0.0 );
        
SetPlayerHealth damagedidremainHP );
        if ( 
remainHP <= OnPlayerDeath damagedidplayeridweaponid );
    }
    if(
damagedid != INVALID_PLAYER_ID && weaponid == 34)
    {
        
SetPlayerHealth(damagedid0.0);
    }
    return 
1;

Reply


Messages In This Thread
Onplayerdeath and afk kill - by Bogdanphr - 26.01.2014, 20:08
Re: Onplayerdeath and afk kill - by Manyula - 27.01.2014, 07:32
Re: Onplayerdeath and afk kill - by Scottas - 27.01.2014, 07:39
Re: Onplayerdeath and afk kill - by Bogdanphr - 27.01.2014, 09:55
Re: Onplayerdeath and afk kill - by Bogdanphr - 27.01.2014, 14:25

Forum Jump:


Users browsing this thread: 2 Guest(s)