You should place a driver and a gunner in your vehicle.
The gunner always fires automatically at enemies, if the vehicle has a gunner weapon like a MG.
If you also want the driver to shoot and drive automatically, you have to code new AI behaviour.
Look here: http://freesdk.crydev.net/display/SDKDOC5/AI+Scripting
I don't know if it's implemented in the free SDK, but for Crysis there is the behaviour TankClose for tanks, which you can use in conjunction with an AI>Signal FG node to make the tank drive back and forth on a specific path and shooting the player with the main cannon.