MOTD loop redo

This commit is contained in:
ChocoTaco 2019-12-18 16:33:55 -05:00
parent 73c77f4d2d
commit 720493515b

View file

@ -348,18 +348,22 @@ function sendLoadscreen(%client)
%MOTDMsg2 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD2; %MOTDMsg2 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD2;
%MOTDMsg3 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD3; %MOTDMsg3 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD3;
%MOTDMsg4 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD4; %MOTDMsg4 = "<lmargin:24><Font:univers:18><bitmap:bullet_2><color:" @ $Host::LoadScreenColor2 @ ">" @ $Host::LoadScreenMOTD4;
//MOTD Loop //MOTD Loop
//Leave line " " in ServerPrefs to not show a line //Leave line " " in ServerPrefs to not show a line
for(%x = 1; %x <= 4; %x++) for(%x = 1; %x <= 4; %x++)
{ {
if( $Host::LoadScreenMOTD[%x] !$= " " && %x $= 1 ) if($Host::LoadScreenMOTD[%x] !$= " " && $Host::LoadScreenMOTD[%x] !$= "")
{ {
messageClient(%client, 'MsgDebriefAddLine', "", %MOTDHeader); if(%x $= 1)
messageClient(%client, 'MsgDebriefAddLine', "", %MOTDMsg[%x]); {
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 // Normal Screen Always in the Background