Try this code:
var
enabled: boolean;
Procedure ActivateServer();
begin
enabled:=false;
end;
Procedure AppOnIdle(Ticks: Integer);
var
i: byte;
begin
if (Ticks mod (60 * 16) = 0) then begin
if enabled then begin
for i := 1 to 16 do begin
if (GetPlayerStat(i, 'active')) then begin
GiveBonus(i, 1);
DrawText(i, ' ', 2, $00000000, 1, 0, 0);
end;
end;
end;
end;
end;
function OnCommand(ID: Byte; Text: string): boolean;
var
i: byte;
begin
if Text = '/predatorwar' then begin
if enabled then begin
WriteConsole(0,'PredatorWar has been disabled!', $FF0000);
enabled := false;
end
else begin
WriteConsole(0,'PredatorWar has been enabled!', $FF0000);
enabled := true;
for i := 1 to 16 do begin
if (GetPlayerStat(i, 'active')) then begin
GiveBonus(i, 1);
DrawText(i, ' ', 2, $00000000, 1, 0, 0);
end;
end;
end;
end;
end;