23.02.2013, 22:06
I'm using this script that I found that is an include. The link to the include can be found here: https://sampforum.blast.hk/showthread.php?tid=403713
I had this working 100% before but for some reason it's no longer working, heres the code:
Now for some reason, it 1 hit kills them even if you shoot them in the foot. It wasn't doing that before, it was when you shot someone in the head. It worked and killed them, now if you shoot them in the foot, it kills them.
I had this working 100% before but for some reason it's no longer working, heres the code:
PHP код:
public OnPlayerHeadshot(playerid,targetid,weaponid)
{
if(PlayerInfo[targetid][pFaction] == 8)
{
new Float:Arm,Float:heal;
GetPlayerArmour(targetid,Arm);
GetPlayerHealth(targetid,heal);
switch(weaponid){
case 34:
{
SetPlayerHealth(targetid,0);
}
}
GameTextForPlayer(playerid,"HEADSHOT !",1000,6);
GameTextForPlayer(targetid,"OUCH ! HEADSHOT !",1000,6);
}
return 1;
}