For that to work, the following has to be true:
- You have to execute that script.
- You have to evaluate the command, either through console or some other thing.
- You have to be connected to a server and in control of your player.
- You have to be checking in console, not chat.
Are you using some client-sided mod that parses
/* into
serverCmd* upon sending a chat message or not? The problem is not the code within the function, it's either invoking the function, executing the script or broken
ConsoleDlg.