well, if you want a function to be able to be used as a slash command, do this: function serverCmdSlashCommand (%client, %arg) {
//do what you want the slash command to do here
}
Change the SlashCommand part to set the name of the command, I.E. serverCmdShoopDaWhoop would make the slash command /shoopdawhoop .
And, %client has stuff about the person who uses it (for admin-based checks, usually) and, keep in mind, it's not too easy to program multiple args in a slash command.