I want to make script that will choose player with highest score and if he will be able to do something. I wrote this script but it isn't working.
var
m: byte;
f:byte;
highscore: integer;
procedure HighscorerChange(highscore:integer; highscorer: byte);
begin
for m:=1 to 32 do if GetPlayerStat(m,'kills')>highscore then begin
m:=GetPlayerStat(highscorer,'id');
highscore:=GetPlayerStat(highscorer,'kills');
WriteConsole(0,'bbb',rgb(0,0,100));
Writeln('bbb');
end;
end;
If anybody can help please write here.