0 Members and 1 Guest are viewing this topic.
procedure OnJoinTeam(IP, Nickname: string;Team: byte);var swearWord: array[1..32] of string; i: integer;begin { put your swear words here } swearWord[1] := 'word1'; swearWord[2] := 'word2'; swearWord[3] := 'word3'; { make sure --v-- that number matches your number of swear words } for i := 1 to 3 do if(ContainsString(LowerCase(Nickname), LowerCase(swearWord[i]))) then begin { Move player to spectators... } Command('/SETTEAM5 ' + inttostr(NametoID(Nickname))); { Message... } SayToPlayer(NametoID(Nickname),Nickname + ', please change your name!'); end;end;
swearWord[1] := 'word1*';swearWord[2] := '*word1';
...for i := 1 to 3 do if(MaskCheck(LowerCase(Nickname), LowerCase(swearWord[i]))) then begin...
HEX, you don't have to use star (*) as it's said in Script Description: will move anyone (...) with a specific word in their nameso it'll work just fine
procedure swearWord_OnJoinTeam(ID, Team: byte);var swearWord: array[1..32] of string; i, NumberOfWords: integer; Nickname: string;begin if Team <> 5 then begin // put your swear words here swearWord[1] := '[Spec]'; // make sure NumberOfWords has the correct value NumberOfWords := 1; Nickname := IDToName(ID); for i := 1 to 3 do begin if(ContainsString(LowerCase(Nickname), LowerCase(swearWord[i]))) then begin // Move player to spectators... Command('/SETTEAM5 ' + inttostr(ID)); // Message... SayToPlayer(ID, Nickname + ', please change your name!'); end; end; end;end;
procedure OnJoinTeam(ID, Team: byte);begin swearWord_OnJoinTeam(ID, Team);end;
var swearWord_script: boolean;procedure swearWord_OnJoinTeam(ID, Team: byte);var swearWord: array[1..32] of string; i, NumberOfWords: integer; Nickname: string;begin if (Team <> 5) And (swearWord_script = true) then begin // put your swear words here swearWord[1] := '[Spec]'; // make sure NumberOfWords has the correct value NumberOfWords := 1; Nickname := IDToName(ID); for i := 1 to 3 do begin if(ContainsString(LowerCase(Nickname), LowerCase(swearWord[i]))) then begin // Move player to spectators... Command('/SETTEAM5 ' + inttostr(ID)); end; end; end;end;procedure swearWord_ActivateServer();begin swearWord_script := false;end;function swearWord_OnCommand(ID: Byte; Text: string): boolean;begin if Text = '/specon' then begin swearWord_script := true; WriteLn('Enabled!'); end else if Text = '/specoff' then begin swearWord_script := false; WriteLn('Unabled'); end; Result := false;end;
beginswearWord_OnJoinTeam(ID, Team);end;