Help reduce damage from bazooka close
#1

wanted help from you to create a system that when the player shooting someone with a rocket up close and decrease the damage it possible? tried to do so it worked to lessen the damage of the sniper bazooka not giving ta: S.

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if (weaponid == 34)//We check whether the player is with a sniper ...
    {
        new Float:fX,Float:fY,Float:fZ;
        GetPlayerPos(playerid, fX, fY, fZ);//We will store the position of the shooter.
        if (IsPlayerInRangeOfPoint(damagedid, 50.0, fX, fY, fZ))//Check if the player who took the damage is within 20 meters from the shooter.
        {

            new Float:health;
            GetPlayerHealth(damagedid, health);
            SetPlayerHealth(damagedid, health - 1.0);
       }
       }
       if (weaponid == 36)//We check whether the player is with a bazooka
       {
          new Float:fX,Float:fY,Float:fZ;
          GetPlayerPos(playerid, fX, fY, fZ);//We will store the position of the shooter.
          if (IsPlayerInRangeOfPoint(damagedid, 20.0, fX, fY, fZ))// Check if the player who took the damage is within 20 meters from the shooter.
          {
            new Float:health;
            GetPlayerHealth(damagedid, health);
            SetPlayerHealth(damagedid, health - 1.0);
       }
    }
    return 1;
}
Reply


Messages In This Thread
Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 01:12
Re: Help reduce damage from bazooka close - by SilentSoul - 13.06.2014, 02:18
Re: Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 02:50
Re: Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 16:14
Re: Help reduce damage from bazooka close - by Manyula - 13.06.2014, 16:18
Re: Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 17:13
Re: Help reduce damage from bazooka close - by Faisal_khan - 13.06.2014, 19:52
Re: Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 20:56
Re: Help reduce damage from bazooka close - by maramizo - 13.06.2014, 21:07
Re: Help reduce damage from bazooka close - by Freak@ - 13.06.2014, 23:13

Forum Jump:


Users browsing this thread: 1 Guest(s)