Credits to GTA modding community for the pointers and ryousuke's heliarm script and his modding website for reference and info.
I'm not good with scripting and posting mods but this is my first mod.
Calculation used in this mod differs from ryousuke as I don't understand his calculations.
For cars:
It will spawn a minigun on top of the car whenever the player enters it and it will automatically removes itself when exiting from car.
Press L to activate it and K to deactivate it.
When activated, it will automatically aim at peds and cars(priority goes to peds before cars).
Press and hold right mouse button to manually aim the minigun.
Press secondary fire to fire.
For rhinos:
The minigun will spawn on top of the tank turret. The usage is the same as in the case of car but it will include an additional fixed gun which can be fired using the secondary fire while the minigun is inactive.
Notable bug(s):
If you pitch up the car too fast while manual targeting, the gunshot tend to hit player's car.
Feel Free to modify the script(will be provided with the file) or improve on it. This script is open for the modding community
Changelogs:
View at: http://gtaforums.com/topic/774367-relsa-minigun-on-cars/
Pre-release
NiL for the moment.
Video Link:
https://www.youtube.com/watch?v=1KCZQhB3JRY&feature=youtu.be