Seems simple and pretty good.
First about the layout, instead of using a tab; just do two spaces, saves up some room. Also it would be nice if you added an extra line between different procedures and const/var.
Like you said it will prolly be for htf, note that this code wont work for ctf, since there can be only one FlagCarrier at the same time.
This seems double (if not triple, think about it):
if FlagCapped = True then begin
if GetPlayerStat(FlagCarrier,'Flagger') = True then begin
if FlagCapped = True then
If the player is flagger, then the flag is automatically capped, no?
This piece of code stands one tab too far:
if GetPlayerStat(FlagCarrier,'Flagger') = False then
FlagCapped := False;
Also, don't forget to put BonusTimer back on zero here!
BonusTimer := BonusTimer+1;
you can use inc(BonusTimer, 1) here
mweh.. you know what, here:
procedure AppOnIdle(Ticks: integer);
begin
if FlagCapped then begin
if GetPlayerStat(FlagCarrier,'Flagger') then begin
inc(BonusTimer, 1);
if (BonusTime mod TimeBetweenBonus = 0) then SetScore(FlagCarrier,GetPlayerStat(FlagCarrier,'kills')+BonusPoints);//mod = modulo, look it up
end else begin
FlagCapped := False;
BonusTime := 0;
end;
end;
end;
hope i helped