Code: Select all
broadcastMsg(lng.playerJoinMsg, client.playerName $ ", Team '" $ client.myTeamName $ "'", client.title, client.player.playerReplicationInfo);Code: Select all
***************************************************************************************************
*
* $DESCRIPTION Broadcasts the given message to all connected clients.
* $PARAM msg Message that should send to all the clients.
* $PARAM str1 Message specific content.
* $PARAM str2 Message specific content.
* $PARAM str3 Message specific content.
* $PARAM str4 Message specific content.
* $PARAM pri Replication info of the player related to this message.
*
**************************************************************************************************/
function broadcastMsg(string msg, optional string str1, optional string str2, optional string str3,
optional string str4, optional PlayerReplicationInfo pri) {
local NexgenClient client;
// Format message.
msg = class'NexgenUtil'.static.format(msg, str1, str2, str3, str4);
// Log message.
nscLog(class'NexgenUtil'.static.removeMessageColorTag(msg), LT_Event);
// Send message to all clients.
for (client = clientList; client != none; client = client.nextClient) {
client.showMsg(msg, pri);
}
}