Not taking damage when under x health problem
#1

Hello, I have a small problem when creating a script in my server, it works all good with one small exception, when the player B is under the custom made damage of a weapon, he won't take any damage at all. I will post the script under me.
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
     new
     
Float:health,
     
Float:armour
     
;
    
GetPlayerHealth(playeridhealth);
    
GetPlayerArmour(playeridarmour);
    switch(
weaponid
    
    {
  case 
24// Desert Eagle weapon ID
{
    switch(
armour
    {
        case 
0
        {
           switch(
bodypart
{
    case 
3SetPlayerHealth(playeridhealth 70); // Torso.
    
case 4SetPlayerHealth(playeridhealth 65); // Groin.
    
case 5SetPlayerHealth(playeridhealth 40);  // Left Arm.
    
case 6SetPlayerHealth(playeridhealth 40); // Right Arm.
    
case 7SetPlayerHealth(playeridhealth 40);  // Left Leg.
    
case 8SetPlayerHealth(playeridhealth 40); // Right Leg.
    
case 9SetPlayerHealth(playeridhealth 100); // Head.
}
        }
        default:
        {
        switch(
bodypart)
        {
        case 
3SetPlayerArmour(playeridhealth 70); // Torso.
    
case 4SetPlayerArmour(playeridhealth 65); // Groin.
    
case 5SetPlayerArmour(playeridhealth 40);  // Left Arm.
    
case 6SetPlayerArmour(playeridhealth 40); // Right Arm.
    
case 7SetPlayerArmour(playeridhealth 40);  // Left Leg.
    
case 8SetPlayerArmour(playeridhealth 40); // Right Leg.
    
case 9SetPlayerArmour(playeridhealth 100); // Head.
    
}
    }
    }
        } 
Reply


Messages In This Thread
Not taking damage when under x health problem - by cs_waller - 21.07.2016, 20:04
Re: Not taking damage when under x health problem - by FuNkYTheGreat - 21.07.2016, 20:12
Re: Not taking damage when under x health problem - by cs_waller - 21.07.2016, 20:25

Forum Jump:


Users browsing this thread: 2 Guest(s)