Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: SneS on February 27, 2016, 11:42:01 am
-
I am looking for a simple script with two commands:
!join and !spec. Sameone help?
-
http://forums.soldat.pl/index.php?topic=39941.msg519807#msg519807
Or me newer update in attach or code:
fast write
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;
-
Thanks you so much ;D