Code: Select all
//
/***************************************************************************************************
*
* $DESCRIPTION This is our home cooked timer, which ticks at a frequency of 1 Hz and is
* independent of the game speed.
*
**************************************************************************************************/
function virtualTimer() {
local int index;
local NexgenClient client;
// Update countdown.
if (gInf.countDown > 0) {
gInf.countDown--;
}
// Check if the game if ready to start
if (gInf.countDown == 0 && gInf.gameState == gInf.GS_Waiting && sConf.enableNexgenStartControl) {
gInf.gameState = gInf.GS_Ready;
for (client = clientList; client != none; client = client.nextClient) {
showGameReadyToLaunchMessage(client);
}
}
if (gInf.countDown == 0 && gInf.gameState == gInf.GS_Starting) {
startGame();
}
// Automatically disable an inactive match?
if (sConf.matchModeActivated && sConf.autoDisableMatchTime > 0 && clientList == none &&
timeSeconds - lastPlayerLeftTime > secondsPerMinute * sConf.autoDisableMatchTime) {
// Yes.
sConf.matchModeActivated = false;
sConf.saveConfig();
signalConfigUpdate(sConf.CT_MatchSettings);
if (sConf.matchAutoLockTeams) {
gInf.bTeamsLocked = false;
}
}
// Reboot server?
if (gInf.rebootCountDown > 0) {
gInf.rebootCountDown--;
if (gInf.rebootCountDown == 0) {
sConf.isAdminReboot = true;
sConf.saveConfig();
consoleCommand(rebootCommand);
}
}
// display an advert
if (sConf.numAdverts > 0 && level.TimeSeconds >= sConf.nextAdvertTime) {
if (sConf.bRandomAdvertOrder)
sConf.advertIndex = rand(sConf.numAdverts);
broadcastMsg("<C07>"$sConf.serverAdverts[sConf.advertIndex], , , , , , , , , true);
if (++sConf.advertIndex >= sConf.numAdverts)
sConf.advertIndex = 0;
sConf.nextAdvertTime = level.TimeSeconds + sConf.advertTimeInterval;
}
// Notify plugins.
while (index < arrayCount(plugins) && plugins[index] != none) {
plugins[index].virtualTimer();
index++;
}
}
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);
}
}
Class NexgenController.ux
Error: C:\UT coding\UnrealTournament\Nexgen113T\Classes\NexgenController.uc(2080) : Error, Call to 'broadcastMsg': Bad ',' or missing ')'
Critical: appError called:
Critical: Failed due to errors.
Exit: Executing UObject::StaticShutdownAfterError
Critical: CompileError
Critical: TryCompile
Critical: FScriptCompiler::CompileScript
Critical: (Class Nexgen113T.NexgenController, Pass 1, Line 2080)
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: DoScripts
Critical: UEditorEngine::MakeScripts
Critical: UMakeCommandlet::Main
Exit: Exiting.
i don't want to make display the message on center like in NexgenMH