0 Members and 2 Guests are viewing this topic.
const MinSpaces = 4;procedure OnJoinTeam(const Id, Team: byte);begin if (ContainsString(GetPlayerStat(Id, 'Name'), Replicate(' ', MinSpaces))) then KickPlayer(Id);end;
procedure OnJoinTeam(Id, Team: byte);var i, n: byte; name: string;begin name := IDToName(Id); for i := 1 to Length(name) do begin if name[i] = ' ' then n := n + 1 else n := n div 2; if n = 5 then begin KickPlayer(ID); break; end; end;end;
is there such func in crapcore as Replicate()?
Code: [Select]const MinSpaces = 4;procedure OnJoinTeam(const Id, Team: byte);begin if (ContainsString(GetPlayerStat(Id, 'Name'), Replicate(' ', MinSpaces))) then KickPlayer(Id);end;Untested. Let us know if this at least compiles, and/or works as intended.