Author Topic: TeamChange_1.1 New Commands added!  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

Offline Vyka

  • Major
  • *
  • Posts: 59
TeamChange_1.1 New Commands added!
« 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

Code: [Select]
//    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;
...
...

« Last Edit: September 16, 2008, 11:13:11 am by Vyka »

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: TeamChange by !red, !blue (!yellow and !green also if admin want (command))
« Reply #1 on: September 15, 2008, 02:40:42 pm »
availiable
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: TeamChange by !red, !blue (!yellow and !green also if admin want (command))
« Reply #2 on: September 15, 2008, 02:43:39 pm »
Should be available >.>
Text goes here...

Offline Vyka

  • Major
  • *
  • Posts: 59
Re: TeamChange by !red, !blue (!yellow and !green also if admin want (command))
« Reply #3 on: September 15, 2008, 02:52:49 pm »
I changed that, sorry for my english. Also changed mistakes in attached file. Thanks a lot :)

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: TeamChange by !red, !blue (!yellow and !green also if admin want (command))
« Reply #4 on: September 15, 2008, 03:38:20 pm »
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)
Text goes here...

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: TeamChange by !red, !blue (!yellow and !green also if admin want (command))
« Reply #5 on: September 16, 2008, 05:28:47 am »
Support "alpha" "bravo" "charlie" "delta" "spec" "spectate" "spectator" please :)

Offline Vyka

  • Major
  • *
  • Posts: 59
Re: TeamChange_1.1 New Commands added!
« Reply #6 on: September 16, 2008, 11:04:17 am »
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 ;)

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: TeamChange_1.1 New Commands added!
« Reply #7 on: September 16, 2008, 08:07:29 pm »
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)