How do I make a vehicle that shoots using M1?

How do I make a vehicle that shoots using M1?
I was on a server and some guy make a flying airboat with the Carbines from CS:S attached to it which would fire when pressing M1…how do I go about doing that?

Download WireMod, spawn a airboat and a Wired Turret with the Carbine model, then get out the Advanced Pod Controller tool, spawn one, then link it with the AirBoat. Then weld the Turret to the Airboat and wire it to the “Mouse1” output of the pod controller.

I can bind the shoot turret to Mouse1?

Thanks for the detailed reply I just downloaded wire mod so I have to try this out

how do I change a turrets model? is it an addon to the wire mod?

Did you get the SVN version of Wiremod?
Or did you go on Gmod.org?

You are trying to spawn a WIRED turret, right? Because in the latest SVN there are various models to pick on the tool menu.