Script Name: Kill Out of Bounds Respawners
Script Description: Kills players that go out of bounds, thus preventing them from re-healing again (like many times done in realistic/survival matches @ ctf_voland...)
Original Author(s): deguix
Core Version: 2.6.2
Code:
type
trPlayer = record
Alive : Boolean;
KillRespawn : Boolean;
end;
var
aPlayers: array [1..32] of trPlayer;
procedure AppOnIdle(Ticks: integer);
var
i:Integer;
begin
for i:=1 to 32 do
if (GetPlayerStat(i,'Active') = True) and aPlayers[i].KillRespawn then begin
DoDamage(i,4000);
aPlayers[i].KillRespawn := False;
end;
end;
procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
aPlayers[ID].Alive := False;
aPlayers[ID].KillRespawn := False;
end;
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
begin
aPlayers[Victim].Alive := False;
end;
procedure OnPlayerRespawn(ID: byte);
begin
if aPlayers[ID].Alive then
aPlayers[ID].KillRespawn := True;
aPlayers[ID].Alive := True;
end;