PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
setAni("idle", null);
}
That should work—only difference is no space after setAni. But even if the engine complains about that (and I don't know if it does), that shouldn't turn you invisible.
What do you see in F2, particularly under "Files" and "Scripts"?