Fightstyle Problem
#6

Quote:
Originally Posted by Rittik
Посмотреть сообщение
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(GetPlayerWeapon(playerid)==0)
     {
        if(GetPlayerFightingStyle(playerid)==7) // '7' is for FIGHT_STYLE_KNEEHEAD
         {
            SetPlayerHealth(damagedid,GetPlayerHealth(damagedid)-5.0);
          }
     }
    return 1;
}
This code should take half of the player's life, + -5.0 of his health.
Surprised that your indentation is a little better..
You should rather use a positive value. Otherwise he will just get more damage.
pawn Код:
if(GetPlayerFightingStyle(playerid)==7) // '7' is for FIGHT_STYLE_KNEEHEAD
{
    SetPlayerHealth(damagedid,GetPlayerHealth(damagedid) + 45.0);
}
Reply


Messages In This Thread
Fightstyle Problem - by cedizon - 29.05.2014, 07:21
Re: Fightstyle Problem - by Barnwell - 29.05.2014, 07:25
Re: Fightstyle Problem - by cedizon - 29.05.2014, 07:28
Re: Fightstyle Problem - by Lynn - 29.05.2014, 07:35
Re: Fightstyle Problem - by Rittik - 29.05.2014, 07:50
Re: Fightstyle Problem - by NaClchemistryK - 29.05.2014, 07:55
Re: Fightstyle Problem - by Rittik - 29.05.2014, 08:02
Re: Fightstyle Problem - by NaClchemistryK - 29.05.2014, 08:07
Re: Fightstyle Problem - by Rittik - 29.05.2014, 08:12
Re: Fightstyle Problem - by Threshold - 29.05.2014, 08:38

Forum Jump:


Users browsing this thread: 3 Guest(s)