0 Members and 2 Guests are viewing this topic.
function GetRandomMap(forbidden: string): string;var MapList: TStringArray; n,x: byte;begin MapList:=xsplit(ReadFile('mapslist.txt'),chr(13)+chr(10)); n:=GetArrayLength(MapList); If n > 0 then while true do begin x:=random(0,n-1); If MapList[x] <> forbidden then begin result:=MapList[x]; exit; end; end else WriteLn('GetRandomMap fails: Empty mapslist.txt');end;
true : begin RandomMap:=true; WriteLn('Map randomizer disabled') WriteConsole(0,'Map randomizer disabled',$8FD2C4); end;
thank you for making this script better then the other crappy one. xD.
wtf U Rox Ava
It already has that feature. It will change to a random map when the timer has reached 00:20.