Backstabbing fail
#1

I made this up to get a player backstabbed when yeah.. the issuer is behind with the knife. Not working. >.<
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(GetPlayerWeapon(issuerid) == 4) {
        new Float:ang[1+1],Float:pos[2+1],Float:angle;
        GetPlayerFacingAngle(issuerid,ang[0]);
        GetPlayerFacingAngle(playerid,ang[1]);
        angle = ang[1]-ang[0];
        print("DEBUG");
        GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
        if(IsPlayerInRangeOfPoint(issuerid,0.5,pos[0],pos[1],pos[2]) && angle < 125.0) {
            print("KILLED");
            SetPlayerHealth(playerid,0);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Backstabbing fail - by Seven_of_Nine - 29.12.2011, 09:43
Re: Backstabbing fail - by Seven_of_Nine - 29.12.2011, 16:30
Re: Backstabbing fail - by Norck - 29.12.2011, 16:48

Forum Jump:


Users browsing this thread: 3 Guest(s)