I understand what he wants. He has some bots in his server he wants unkickable. (i.e. rejoings on kick)
This may work better than having then rejoining (it completely disables /kick ability on certain bot names):
function OnCommand(Id: byte; Text: string): boolean;
var
KickId: byte;
begin
Result := false;
if (LowerCase(Copy(Text, 1, 6)) = '/kick ') then begin
try
KickId := StrtoInt(Copy(Text, 7, Length(Text)));
if (GetPlayerStat(KickId, 'Active') = true) then
if (GetPlayerStat(KickId, 'Human') = false) then
Result := (Name = 'a') or (Name = 'b') or (Name = 'c') or (Name = 'p'); // you should see the pattern
except
end;
end;
end;
procedure OnLeaveGame(Id: byte, Team; Kicked: boolean);
var
Name: string;
begin
if (GetPlayerstat(Id, 'Human') = false) then true
Name := GetPlayerstat(Id, 'Name');
if ((Name = 'a') or (Name = 'b') or (Name = 'c') or (Name = 'p')) then begin // you should see the pattern
Command('/addbot' + InttoStr(Team) + ' ' + Name); // I'm not sure if /addbot0 ____ works for dm games, if its a deathmatch your taking about, just say
end;
end;
end;
Untested. Please say if its bugged / doesn't work.
Theres probably more commands than just /kick (like /ban, or another script kicking the bot), so I added the rejoin thing.