Small question - 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: Small question (
/showthread.php?tid=620317)
Small question -
DemME - 28.10.2016
How to delay between shots in a weapon, I mean, I've tried to use timers, but I can't solve how to put a timer between bullets within the gun, for an example the taser system within LS-RP requires to /reload with animation before tasing again, but I tried to put a timer and nothing happened, it keeps shooting continuously non-stop.
Re: Small question -
AndySedeyn - 28.10.2016
You have to create a variable which keeps track on when the timer is running and when it's finished. Use that variable to prevent the player from firing when needed.
Re: Small question -
DemME - 28.10.2016
Quote:
Originally Posted by AndySedeyn
You have to create a variable which keeps track on when the timer is running and when it's finished. Use that variable to prevent the player from firing when needed.
|
Cool, thanks mate.
Re: Small question -
SickAttack - 29.10.2016
Use timestamps, clear animations if required, return 0 in OnPlayerWeaponShot to desync bullets.