How to spawn an airboat with the gun?

EDIT:
Nevermind got it. I was setting EnableGun to true not 1.

The title says it all. I want to do this with LUA, not console commands. Help will be greatly appreciated. Thanks!

You could use the fire function on your airboat.

[lua]
airboatEnt:Entity:Fire( “EnableGun”, “1”, 0 )
[/lua]

Not sure if you solved it already, your edit wasn’t completely clear, if you did mark it solved.

Yeah I figured it out, this is exactly what I did. My problem was that I was setting EnableGun to true and not to 1. Also I was executing Fire after the spawn, which was a problem.