From 720493515b867456a1a48b759703c41e474026fb Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Wed, 18 Dec 2019 16:33:55 -0500 Subject: [PATCH] MOTD loop redo --- .../scripts/autoexec/zDebriefLoadingScreen.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs index 08b0626..558d11d 100644 --- a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs +++ b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs @@ -348,18 +348,22 @@ function sendLoadscreen(%client) %MOTDMsg2 = "" @ $Host::LoadScreenMOTD2; %MOTDMsg3 = "" @ $Host::LoadScreenMOTD3; %MOTDMsg4 = "" @ $Host::LoadScreenMOTD4; - + //MOTD Loop //Leave line " " in ServerPrefs to not show a line for(%x = 1; %x <= 4; %x++) { - if( $Host::LoadScreenMOTD[%x] !$= " " && %x $= 1 ) + if($Host::LoadScreenMOTD[%x] !$= " " && $Host::LoadScreenMOTD[%x] !$= "") { - messageClient(%client, 'MsgDebriefAddLine', "", %MOTDHeader); - messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg[%x]); + if(%x $= 1) + { + messageClient(%client, 'MsgDebriefAddLine', "", %MOTDHeader); + messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg[%x]); + %header = 1; //No other lines without the header + } + else if(%header) + messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg[%x]); } - else if( $Host::LoadScreenMOTD[%x] !$= " " ) - messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg[%x]); } // Normal Screen Always in the Background