const
RESTARTTIMER = 86400; //60*60*24
procedure AppOnIdle(Ticks: integer);
var
i: byte;
begin
if Ticks mod 60 = 0 then begin
if Ticks >= RESTARTTIMER*60 then
for i := 32 downto 1 do
if GetPlayerStat(i, 'active') then
break;
if i = 0 then
Shutdown();
end;
end;
untested though, i wrote it in quick reply textbox.