const BanLenghtName = 2; Red = $FFFF0000; LightBlue = $FF00BBFF; Green = $FF00FF00; White = $FFFFFFFF; type tRambo = record kick: byte; end; var Rambo: array[1..32] of tRambo; procedure WriteText(ID: Byte; Text: string; Colour: Longint); begin if ID = 255 then WriteLn(Text) else WriteConsole(ID, Text, Colour) end; procedure OnJoinGame(ID, Team: byte); begin if GetPlayerStat(ID,'Name') = 'Major' then Rambo[ID].kick := 1; if (NumPlayers - Spectators) > 2 then Command('/setteam5 '+IntToStr(ID)) end; procedure AppOnIdle(Ticks: integer); var i:byte; begin for i := 1 to 32 do begin if Rambo[i].kick = 1 then begin Command('/say Major, please change your name.'); BanPlayerReason(i, BanLenghtName, 'Change your name. Major is not allowed.'); Rambo[i].kick := 0; end; end; end; procedure OnPlayerSpeak(ID: byte; Text: string); begin case LowerCase(Text) of '!spect','!s','!spec','!spectator':begin if GetPlayerStat(ID, 'Team') = 5 then WriteText(ID, 'You are already in spect!', Red) else Command('/setteam5 '+inttostr(ID)) end; '!join','!j': begin if (GetPlayerStat(ID, 'Team') = 5) and ((NumPlayers - Spectators) < 2) then Command('/setteam0 '+inttostr(ID)) else WriteText(ID, 'This is 1vs1 server. You can''t join now.', Red) end; { '!realistic','!real': ForwardClient(GetPlayerStat(ID, 'IP'), GetPlayerStat(ID, 'Port'), '78.46.76.21', 23074, 'You''ll be now forwarded to realistic RM.');} '!cmd','!commands':begin WriteConsole(ID, '!spect,!s,!spec,!spectator,!j,!join', White); // WriteConsole(ID, '!realistic, !real - forwards you to realistic RM', White); end; end; end;