SA-MP Forums Archive
Stop player from attacks - 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: Stop player from attacks (/showthread.php?tid=591763)



Stop player from attacks - zaibaslr2 - 16.10.2015

Hey,
I want to disable player from attacking (punching) by pressing LMB. I tried using ClearAnimations, but it looks very ugly and not natural, since it just stops you when you run and press LMB. Is there any other way that could disable attacks?
Thanks


Re: Stop player from attacks - bigboy81 - 16.10.2015

You can make when player strikes 3 times server slap him, if he continue server jail him.
Or if you want to disable anim when he punching you can freeze player, if you don't want use ClearAnimation


Re: Stop player from attacks - PrO.GameR - 16.10.2015

As far as I know a player can't do 2 animations at same time, you can check if he is running you applyanimation him into running, if he is standing you applyanimation him into idle stance, thats another way to clear his punch anim.