That isnt what you need to do...
function <YOURWEAPONNAME>Image::onFire(%this,%obj,%slot)
{
servercmd</CMDNAME>(%obj.client);
Parent::onFire(%this,%obj,%slot);
}
So if I wanted to make the gun call the /sit command I would do this
function gunImage::onFire(%this,%obj,%slot)
{
servercmdsit(%obj.client);
Parent::onFire(%this,%obj,%slot);
}
Just stick the code at the bottom of your weapon script and change the text in < >.