Hello guys,
I get AppOnIdle Errors with my script ( Thanks to Curt =] )
Here is the script.
//Secret Project
var
FlagHolders: array[1..2] of byte;
Dropped: Array[1..32] of boolean;
procedure OnFlagDropped(const Id, Flag: byte);
//var
//Dropped: array[1..32] of boolean;
begin
if Dropped[ID] = True then begin
command('/kill ' +inttostr(ID));
end;
end;
procedure AppOnIdle(Ticks: cardinal);
Var
i: Byte;
begin
For i := 1 to 32 do
if (GetPlayerStat(FlagHolders[1], 'Flagger') = false) then begin // if the old alpha flag holder no longer has the flag
OnFlagDropped(FlagHolders[1], 1);
FlagHolders[1] := 0; // clear the alpha flag holder
Dropped[i] := true;
end;
if (GetPlayerStat(FlagHolders[2], 'Flagger') = false) then begin
OnFlagDropped(FlagHolders[2], 2);
FlagHolders[2] := 0;
Dropped[i] := True;
end;
end;
procedure OnFlagGrab(ID, TeamFlag: byte;GrabbedInBase: boolean);
begin
ForceWeapon(ID,255,255,255);
if (FlagHolders[TeamFlag] <> 0) then // if there was an old flag holder (can be the same person)
OnFlagDropped(FlagHolders[TeamFlag], TeamFlag);
FlagHolders[TeamFlag] := Id; // set the new flag holder for the given team flag
// other contents
end;
Procedure OnFlagScore(ID, TeamFlag:Byte);
//Var
//Dropped: Array [1..32] of boolean;
begin
Dropped[ID]:=False;
ForceWeapon(ID,7,1,1);
end;
procedure OnJoinTeam(ID, Team: byte);
begin
Dropped[ID]:=False;
end;
procedure OnPlayerRespawn(ID: Byte);
begin
Dropped[ID]:=False;
end;
I tried with For i := 1 to 32 do begin
for all procedures but it wasn't detecting the false either the true.