Anti Knifebugging?
#1

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

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

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

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
Reply
#5

Quote:
Originally Posted by Dwane
View Post
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.
Reply
#6

Quote:
Originally Posted by [HRD]Mar1
View Post
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.
Reply
#7

Yeah but where must i add that ClearAnimations?
Reply
#8

Know everyone an Answer?
Reply
#9

OnPlayerUpdate (OPU) should help you. Put there check for that animation and put ClearAnimations(playerid); if check is true.
Reply
#10

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; 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)