#define BODY_PART_TORSO 3
#define BODY_PART_LEFT_ARM 5
#define BODY_PART_RIGHT_ARM 6
#define BODY_PART_LEFT_LEG 7
#define BODY_PART_RIGHT_LEG 8
#define BODY_PART_HEAD 9
forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart);
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 || weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
if(bodypart == BODY_PART_HEAD)
{
SetPlayerHealth(damagedid,0);
//golyót kapott a fejébe
}else if(bodypart == BODY_PART_TORSO)
{
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp-60);
TogglePlayerControllable(damagedid,0);
SetPlayerDrunkLevel(damagedid, 7500);
ClearAnimations(damagedid);
ApplyAnimation(damagedid,\"SWAT\",\"gnstwall_injurd\",4.1,0,1,1,1,1);
//golyót kapott a hasába
}else if(bodypart == BODY_PART_RIGHT_LEG || bodypart == BODY_PART_RIGHT_LEG)
{
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp-40);
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
ApplyAnimation(damagedid,\"PED\",\"KO_skid_front\",4.1,0,1,1,1,1);
//golyó a lábába
SetPlayerDrunkLevel(damagedid, 5500);
}else if(bodypart == BODY_PART_RIGHT_ARM || bodypart == BODY_PART_RIGHT_ARM)
{
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp-20);
SetPlayerDrunkLevel(damagedid, 5100);
//golyó a karjába
}
}
return 1;
}