Put the Parent::... where the return; is now.
What you have it doing right now is telling them that they can't use it, and then letting them use it, or if they are on a vehicle, not letting them use it.
Also, it has a syntax error, as the commandToClient.. line ends at the " when it should end with ");
Additionally, you do not need the else if, because a plain else would work just as well, although this isn't really a problem, just adding unnessecary code and complexity.
This is probably what you want:
function minigunImage::onFire(%this,%obj,%slot)
{
if(%obj.isMounted())
Parent::onFire(%this,%obj,%slot);
else
commandToClient(%client, 'CenterPrint', "<color:FFC29B>The minigun only works in vehicles<color:555555>.<br\><color:FF0000>Please go into a vehicle<color:555555>.");
}