Author Topic: !join and !spec script  (Read 820 times)

0 Members and 1 Guest are viewing this topic.

Offline SneS

  • Soldier
  • **
  • Posts: 110
!join and !spec script
« on: February 27, 2016, 11:42:01 am »
I am looking for a simple script with two commands:

!join and !spec. Sameone help?

Offline soldat-game

  • Camper
  • ***
  • Posts: 402
Re: !join and !spec script
« Reply #1 on: February 27, 2016, 12:15:14 pm »
http://forums.soldat.pl/index.php?topic=39941.msg519807#msg519807

Or me newer update in attach or code:
fast write
Code: [Select]
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;

Offline SneS

  • Soldier
  • **
  • Posts: 110
Re: !join and !spec script
« Reply #2 on: February 27, 2016, 12:18:49 pm »
Thanks you so much  ;D