The functions commandToClient and commandtoServer sends a command to the client or the server. commandToClient takes 2+ parameters. The first one being the id of the client, the second is the tag of the command the client should execute. All following parameters is the arguments passed to the command.
commandToServer is similar, except it doesn't need an ID so it takes 1+ parameters. To define a function which can be called by a network command, it has to follow a special naming convention. clientCmdtheCommandName(args);