SA-MP Forums Archive
Max distance shoot for weapons. - 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: Max distance shoot for weapons. (/showthread.php?tid=602899)



Max distance shoot for weapons. - ScIrUsna - 15.03.2016

Hi,

Is there a function to know specific weapon id max shoot distance? i mean when you shoot to player what max distance could by between them


Re: Max distance shoot for weapons. - Crayder - 15.03.2016

No, there is not.

However, if you use Slice's weapon config include there is (in fact they are pulled right from the default GTA weapon configuration) and a lot more. You can even SET the max distance of each weapon with it!


Re: Max distance shoot for weapons. - Karan007 - 15.03.2016

You can simulate one using a script. You could use OnPlayerWeaponShot, check the position where the player shot the gun and then the coordinates where the bullet stopped.