SA-MP Forums Archive
How to disable shooting? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: How to disable shooting? (/showthread.php?tid=444646)



How to disable shooting? - ajwar - 17.06.2013

I have disabled simple shooting with left mouse button, but if i hold left button (shooting) and at the same moment while i am holding i change my gun then i can shoot. How to fix that?


Re: How to disable shooting? - milanosie - 17.06.2013

What code did you use to disable the shooting with the mouse?
Copy/Paste it here and I'll make some changes w/ explanation next to it.


Re: How to disable shooting? - ajwar - 17.06.2013

OnPlayerUpdate:

pawn Code:
if(GetPlayerWeapon(playerid)!=0 && IsPlayerInSafeZone(playerid)){SetPlayerArmedWeapon(playerid, 0);return 0;}



Re: How to disable shooting? - iRage - 17.06.2013

Check for animations as well, also you could return the health lost to players using OnPlayerTakeDamage