0 Members and 1 Guest are viewing this topic.
procedure OnPlayerSpeak(ID: byte; Text: string);var a,b:integer;begin if regExpMatch('^!(a|alpha|red|1|joina|join a)$',lowercase(Text)) then begin if (GetPlayerStat(ID, 'Team')<>1) then begin Command('/setteam1 '+inttostr(ID)); end; end; if regExpMatch('^!(b|bravo|blue|2|joinb|join b)$',lowercase(Text)) then begin if (GetPlayerStat(ID,'Team')<>2) then begin Command('/setteam2 '+inttostr(ID)); end; end; if regExpMatch('^!(join)$',lowercase(Text)) then begin if (GetPlayerStat(ID,'Team')=5) then begin a:=alphaplayers; b:=bravoplayers; if (a<=b) then Command('/setteam1 '+inttostr(ID)) else Command('/setteam2 '+inttostr(ID)); end else WriteConsole(ID,'You are is in game.', $CC0000); end;end;