0 Members and 1 Guest are viewing this topic.
WriteLnFile(CheckDir + CurrentMap + '.log',IDToName(ID) + ' scored in ' + inttostr(minutes[ID]) + ':0' + inttostr(seconds[ID])); WriteConsole(ID, 'You finished ' + CurrentMap + ' in ' + inttostr(minutes[ID]) + ':0' + inttostr(seconds[ID]) , $EE35BCE9)
function XJoin(ary: array of string; splitter: string): string;var i: integer;beginresult := ary[0];for i := 1 to getarraylength(ary)-1 do begin result := result+splitter+ary[i]; end;end;procedure LoadSprees();var spreefile: array of string; i: integer;beginspreefile := xsplit(readfile('scripts/'+scriptname+'/toplist.txt'),chr(13)+chr(10));for i := 1 to toplist do begin if i <= getarraylength(spreefile)-1 then begin topsprees[i] := strtoint(getpiece(spreefile[i-1],' ',0)); topnames[i] := getpiece(spreefile[i-1],getpiece(spreefile[i-1],' ',0)+' ',1); end else begin topsprees[i] := 0; topnames[i] := ''; end; end;end;procedure SaveTopList();var i: integer; output: array[1..toplist] of string;beginfor i := 1 to toplist do begin output[i] := inttostr(topsprees[i])+' '+topnames[i]; end;writefile('scripts/'+scriptname+'/toplist.txt',xjoin(output,chr(13)+chr(10)))end;