SA-MP Forums Archive
Body Part aiming - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Body Part aiming (/showthread.php?tid=418164)



Body Part aiming - mrtms - 23.02.2013

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.


Re: Body Part aiming - ikey07 - 23.02.2013

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


Re: Body Part aiming - mrtms - 23.02.2013

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


Re: Body Part aiming - mrtms - 23.02.2013

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.