Anti Knifebugging? -
Blackazur - 25.12.2012
Hello, is there any Methode to script an Anti Knifebugging, so that Players with Knife cant kill a other Guy from the back, and cute of his Neck?
Re: Anti Knifebugging? -
Konstantinos - 25.12.2012
There is. Check if the animation the player is applying is the one with the knife animation and if it's the same
pawn Code:
ClearAnimations(playerid);
should prevent from doing this.
Re: Anti Knifebugging? -
B-Matt - 25.12.2012
You need to check if player with knife is around of other player and is he using right mouse click. So this is theory, you need to script it.
Or Dwane's idea which is much better than mine.
Re : Anti Knifebugging? -
[HRD]Mar1 - 25.12.2012
Negative!
But you can fix it if player pausing teleport him to another place that he will be safe from the enemie knife.
When he back he will back to his last position of pausing
AW: Re: Anti Knifebugging? -
Blackazur - 25.12.2012
Quote:
Originally Posted by Dwane
There is. Check if the animation the player is applying is the one with the knife animation and if it's the same
pawn Code:
ClearAnimations(playerid);
should prevent from doing this.
|
Can you make me this? I have no Idea, there are so many Knife-Animations, thanks. I searched long for a Solution for this. I know only that the Animation is
Code:
ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,1,1,1,1,0);
but i dont know where i must add that with ClearAnimations.
Re: Re : Anti Knifebugging? -
B-Matt - 25.12.2012
Quote:
Originally Posted by [HRD]Mar1
Negative!
But you can fix it if player pausing teleport him to another place that he will be safe from the enemie knife.
When he back he will back to his last position of pausing
|
Dwane's idea is much much better. If player apply anim "KILL_Knife_Ped_Damage" you will clear that anim and he won't kill that player.
AW: Anti Knifebugging? -
Blackazur - 25.12.2012
Yeah but where must i add that ClearAnimations?
AW: Anti Knifebugging? -
Blackazur - 25.12.2012
Know everyone an Answer?
Re: Anti Knifebugging? -
B-Matt - 25.12.2012
OnPlayerUpdate (OPU) should help you. Put there check for that animation and put ClearAnimations(playerid); if check is true.
AW: Anti Knifebugging? -
Blackazur - 25.12.2012
Is OPU not resource-eating? And can you make me that, i dont understand that so right. That work not:
Code:
public OnPlayerUpdate(playerid)
{
ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,1,1,1,1,0);
ClearAnimations(playerid);
return 1;
}