Body Part aiming
#1

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:
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;

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.
Reply
#2

Check anim indexes and anim names, also be sure you have latest include of that callback.
Reply
#3

I do and it looks like everything is working fine. I don't see what the problem with this is.
Reply
#4

Anyone have any idea on why it's not detecting the correct body part? It should be working because it was working before but it suddenly stopped working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)