It would have to be client sided, and I personally am against using slash commands for client sided code.
You could however, use another symbol, like ^fire, where ^ calls client sided commands.
package ClientCmds
{
function NMH_Type::Send(%this)
{
if(getSubStr(%this.getValue(),0,1) $= "^")
{
%this.setValue(getSubStr(%this.getValue(),1,strLen(%this.getValue())-1));
%str = %this.getValue();
%cmd = getWord(%str,0);
for(%x=1;%x<getWordCount(%str);%x++)
{
%args = %args @ getWord(%str,%x);
if(%x+1 != getWordCount(%str))
%args = %args @ ",";
}
%this.setValue("");
if(%args !$= "")
echo("call(ClientChatCmd" @ %cmd @ "," @ %args @ ");");
else
call("ClientChatCmd" @ %cmd);
}
Parent::send(%this);
}
};
activatePackage(ClientCmds);
Put this into a separate script file. Call it ClientChatCmds.cs
Now in your client.cs, at the first line, put exec("./ClientChatCmds.cs");
And to make your command, fire, you would do this:
function ClientChatCmdFire(%val)
{
mousefire(%val);
}
And then type ^fire 1 in game to start mousefire, ^fire 0 to stop it.
you should stay away from making client-sided commands (for this purpose). keybinds would be better for this.
But with this way you could add args, like so:
function ClientChatCmdHelloWorld(%arg1, %arg2)
{
echo("Hello world!");
if(%arg1 !$= "")
echo(%arg1);
if(%arg2 !$= "")
echo(%arg2);
}