Disabling Ability to Shoot - 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: Disabling Ability to Shoot (
/showthread.php?tid=430156)
Disabling Ability to Shoot -
Finn707 - 12.04.2013
Hi,
So, I am working on a Replica Weapons system, and I need the player to be able to hold a gun, but not be able to use it, only hold it. Is there a way I can do this, or would I be better off using the weapon objects and attaching them to the players hand (the problem with that is I don't know how aiming would work)?
Re: Disabling Ability to Shoot -
zDivine - 12.04.2013
Hmm, never tried this. Maybe a way you could do this is get the button the player is pressing/holding(the fire button), and if it is, set it to apply some sort of animation, kill the animation, and repeat. (with a loop ofcourse).
Re: Disabling Ability to Shoot -
Andregood - 12.04.2013
You could check if he has a certain weapon and ammunation aka 1 ammo and if he has apply a function or animation or simply unfreeze him or apply the carry animation to disable the shot being taken. ((This is blatantly for a pre-defined key, aka key_fire))
Re: Disabling Ability to Shoot -
zDivine - 12.04.2013
Quote:
Originally Posted by Andregood
You could check if he has a certain weapon and ammunation aka 1 ammo and if he has apply a function or animation or simply unfreeze him or apply the carry animation to disable the shot being taken. ((This is blatantly for a pre-defined key, aka key_fire))
|
You did nothing but copy what I said. Lol.
Re: Disabling Ability to Shoot -
Andregood - 12.04.2013
Quote:
Originally Posted by zDivine
You did nothing but copy what I said. Lol.
|
Sorry about that, didn't pay attention, just tried to help the man
Re: Disabling Ability to Shoot -
Finn707 - 12.04.2013
Hmm, I'm sure I'll work something out along the lines of what you said, thanks for your help.