C4 Engine
C4 Engine API Documentation

MessageMgr::SendMessageClients

Defined in:  C4Messages.h
Sends a message from the server to all clients in a multiplayer game.
Prototype

void SendMessageClients(const Message& message, const Player *exclude = nullptr);

Parameters
message The message to be sent.
exclude An optional pointer to a player that the message will not be sent to.
Description
The SendMessageClients function sends the message given by the message parameter to every client machine. This function should only be called on the server machine and has no effect if called from a client machine. If the exclude parameter is not nullptr, then the message will not be sent to the client corresponding to the excluded player.
See Also

MessageMgr::SendMessageAll

MessageMgr::SendMessage