AA gun? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AA gun? (
/showthread.php?tid=242877)
AA gun? -
sciman001 - 20.03.2011
How can i make an aa gun? Ex. A minigun that shoota at all planes... etc. THANKZ. oh... but it can ONLY shoot one of the 2 teams in my server... anyway.... THANKZ.
AW: AA gun? -
Pablo Borsellino - 20.03.2011
You want a Gun that shoot Airplances automatic?
Re: AA gun? -
sciman001 - 20.03.2011
yes.
Re: AA gun? -
Mauzen - 20.03.2011
In short:
1. Create a minigun object (like the one in singleplayer)
2. Create a timer for it (Interval ~300-500ms should do it)
3. Create the timer function. In that function create a player loop: Check if there are planes/vehicles/players in any range you like (e.g. with IsPlayerInRangeOfPoint). Also check the team of the player. If there is a matching player, decrease his health/his vehicles' health and stop the loop (break) so it will only damage one player at a time. If you like, you could also rotate the object, so it will point in the players' direction, but this will require at least a little bit of math knowledge.
Congratulations! Now you got your own auto-shooting gun!
Re: AA gun? -
sciman001 - 20.03.2011
can you help me script it? i can get part of it... just not so much the last part...
Re: AA gun? -
Vince - 20.03.2011
This what you're looking for?
http://forum.sa-mp.com/showthread.ph...to+air+missile
Re: AA gun? -
sciman001 - 20.03.2011
i will try that and tell u if its good..
Re: AA gun? -
sciman001 - 20.03.2011
the link is bad so no.
Re: AA gun? -
Mike Garber - 20.03.2011
I think this is the 1.2 link for it. I searched on ****** (for pastebin), and i found one from August 26 (i guess version 1?), one from Agusut 28 (I guess version 1.1?) and this is from September 5th, (I guess 1.2 aka latest version)
http://pastebin.com/qc9Xqnvm
Re: AA gun? -
sciman001 - 20.03.2011
whats a boolean? oh... nvm.