0 Members and 3 Guests are viewing this topic.
vardelay: Array [1..32] of shortint;i: byte;procedure OnJoinTeam(ID, Team: byte);begin delay[ID] := 2;end;procedure AppOnIdle(Ticks: integer);beginfor i := 1 to 32 do begin if (delay[i] > 0) then delay[i] := delay[i] - 1; if (delay[i] = 1) then begin if GetPlayerStat(i,'Flagger') then Command('/kill ' +inttostr(i)); end endend;
Code: [Select]vardelay: Array [1..32] of shortint;i: byte;procedure OnJoinTeam(ID, Team: byte);begin delay[ID] := 2;end;procedure AppOnIdle(Ticks: integer);beginfor i := 1 to 32 do begin if (delay[i] > 0) then delay[i] := delay[i] - 1; if (delay[i] = 1) then begin if GetPlayerStat(i,'Flagger') then Command('/kill ' +inttostr(i)); end endend;
var Chex: boolean; Flagzor: array[1..2] of byte;procedure OMGBUG();begin // what to do when bug occursend; procedure OnJoinTeam(ID, Team: byte); // change to Game if you want...begin Chex:= true;end;procedure AppOnIdle(Ticks: integer);var i: byte;begin if Chex then begin for i:= 1 to 2 do if Flagzor[i] <> 0 then if GetPlayerStat(Flagzor[i], 'Flagger') = false then if GetPlayerStat(Flagzor[i], 'Alive') = true then begin OMGBUG(); break; end; Chex:= false; end; for i:= 1 to 32 do if GetPlayerStat(i,'Flagger') = true then Flagzor[StrToInt(IntToStr(GetPlayerStat(i,'Team')))]:= i;end;