Just check my Piratez mod (main file) (STR_TANK_CANNON & STR_TANK_ROCKET_LAUNCHER), the working code is there.
I cannot figure out the builtInWeapons thing, i am running the code in the 'spoiler' section, and it does not recognise the minigun
builtInWeapons: - STR_HWP_MINIGUN - STR_TANK_CANNON - STR_HWP_CANNON_SHELLS
builtInWeapons: - STR_HWP_MINIGUN - STR_HWP_CANNON_SHELLS