Death messages doesn't send for id 0
#6

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
What's the other areas (Callbacks and functions), that you are using that lasthit array?

Where are you setting their health to 0 to make them die like that?
These are the only callbacks that are using the array.

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid

    if(
damagedid != INVALID_PLAYER_ID
    { 
        new 
Float:armourGetPlayerArmour(damagedid,armour); 
        if(
armour 1
        { 
            new 
Float:healthGetPlayerHealth(damagedidhealth); 
            
SetPlayerHealth(damagedid,health-amount); 
            
lasthit[damagedid] = playerid
            return 
1
        } 
        if(
armour 0
        { 
            if(
armour amount
            { 
                new 
Float:healthGetPlayerHealth(damagedidhealth); 
                new 
Float:value amount-armour
                
SetPlayerArmour(damagedid,0); 
                
SetPlayerHealth(damagedid,health-value); 
                
lasthit[damagedid] = playerid
                return 
1
            } 
            if(
armour amount
            { 
                
SetPlayerArmour(damagedid,armour-amount); 
                
lasthit[damagedid] = playerid
                return 
1
            } 
            return 
1
        } 
        return 
1
    } 
    return 
1

Reply


Messages In This Thread
Death messages doesn't send for id 0 - by Exhibit - 11.05.2018, 22:40
Re: Death messages doesn't send for id 0 - by RogueDrifter - 12.05.2018, 05:54
Re: Death messages doesn't send for id 0 - by Sew_Sumi - 12.05.2018, 10:16
Re: Death messages doesn't send for id 0 - by Exhibit - 12.05.2018, 10:42
Re: Death messages doesn't send for id 0 - by Sew_Sumi - 12.05.2018, 10:56
Re: Death messages doesn't send for id 0 - by Exhibit - 12.05.2018, 11:12
Re: Death messages doesn't send for id 0 - by RogueDrifter - 12.05.2018, 14:10
Re: Death messages doesn't send for id 0 - by Exhibit - 12.05.2018, 17:07
Re: Death messages doesn't send for id 0 - by Sew_Sumi - 12.05.2018, 17:49
Re: Death messages doesn't send for id 0 - by RogueDrifter - 13.05.2018, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)