Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: Vyka on September 15, 2008, 02:17:55 pm
-
Script Name: Team Changing
Original Author(s): Vyka
Core Version: 2.6.3
/changing - turning ON or OFF script (!red, !alpha, !blue, !bravo, !spec, !spectator, !spectate are AVAILABLE but !yellow, !charlie, !green, !delta are DISABLED!)
/changing2 - turning ON or OFF script (!red, !alpha, !blue, !bravo, !yellow, !charlie, !green, !delta, !spec, !spectator, !spectate are AVAILABLE)
!red, !alpha, !blue, !bravo, !yellow, !charlie, !green, !delta, !spec, !spectator, !spectate
// Vyka's Team change script ver. 1.1
// Script can be configurated by admin using commands (described few lines under)
// Welcome message to player if script active (information about available commands (!red, !blue etc...))
// Nice colors on team changing. Script can be used in CTF and TM mode :)
// Hope you like it. I decided to write it, because i can't found script like this with good configuration :)
//
// in ver. 1.1 I added more commands. (for DorkeyDear ;)) and cleaned code, now, it's shorter.
// also changed a little bit command, and informations. They're easier to use now.
// If somebody have to chceck activated commands, type !changing. ( !changing commad is in welcome message )
//
// /changing - turning ON or OFF script (!red, !alpha, !blue, !bravo, !spec, !spectator, !spectate AVAILABLE but !yellow, !charlie, !green, !delta DISABLED!)
// /changing2 - turning ON or OFF script (!red, !alpha, !blue, !bravo, !yellow, !charlie, !green, !delta, !spec, !spectator, !spectate AVAILABLE)
FULL CODE IN ATTACHED FILE "teams_fixed_1.1"
...
...
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if ((Text = '!changing') and (status=true) and (yellowgreen=false)) then begin
WriteConsole(ID,'!red, !alpha, !blue, !bravo', colorgreen);
WriteConsole(ID,'!spec, !spectate, !spectator', colorgreen);
WriteConsole(ID,'!yellow, !charlie, !green, !delta', colorred);
end;
if ((Text = '!changing') and (status=true) and (yellowgreen=true)) then begin
WriteConsole(ID,'!red, !alpha, !blue, !bravo', colorgreen);
WriteConsole(ID,'!spec, !spectate, !spectator', colorgreen);
WriteConsole(ID,'!yellow, !charlie, !green, !delta', colorgreen);
end;
if ((Text ='!red') or (Text='!alpha') and (status=true) and (GetPlayerStat(ID,'Team')<>1)) then begin
Command('/setteam1 '+inttostr(ID));
end;
if ((Text='!blue') or (Text='!bravo') and (status=true) and (GetPlayerStat(ID,'Team')<>2)) then begin
Command('/setteam2 '+inttostr(ID));
end;
if (( Text = '!yellow') or (Text='!charlie') and (status=true) and (yellowgreen=true) and (GetPlayerStat(ID,'Team')<>3)) then begin
Command('/setteam3 '+inttostr(ID));
end;
if ((Text='!green') or (Text='!delta') and (status=true) and (yellowgreen=true) and (GetPlayerStat(ID,'Team')<>4)) then begin
Command('/setteam4 '+inttostr(ID));
end;
if ((Text='!spec') or (Text='!spectate') or (Text='!spectator') and (status=true) and (GetPlayerStat(ID,'Team')<>5)) then begin
Command('/setteam5 '+inttostr(ID));
end;
end;
...
...
-
availiable
-
Should be available >.>
-
I changed that, sorry for my english. Also changed mistakes in attached file. Thanks a lot :)
-
If you need any help in translating Polish to English I would gladly help. Just PM me ;) (też jestem Polak, tak jak PaFel i paru innych)
-
Support "alpha" "bravo" "charlie" "delta" "spec" "spectate" "spectator" please :)
-
I added these commands, now, there is able to use :
!red, !alpha, !blue, !bravo, !yellow, !charlie, !green, !delta, !spec, !spectator, !spectate.
hope you enjoy it ;)
also i cleaned and optimized code ;)
-
its sensitive atm, would be better to make it not (Text := LowerCase(Text) or LowerCase(Text) for every Text, which would be un-noticeably but still slower)