Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Serial K!ller on February 20, 2007, 04:21:23 pm

Title: Teamlock [update]
Post by: Serial K!ller on February 20, 2007, 04:21:23 pm
Script Name:Team lock
Script Description:As the title suggest you can lock teams this script(useful for teamdeathmatch), when a player tries to join a locked team he gets transfered to the team with the least players. you can set what teams to lock on startup (settings.ini  1=locked) and with admin command /lockteamX (X=1-4) (/unlockteamX to unlock)
Original Author(s):Serial K!ller
Core Version:2.5.2
Code(teamlock.pas):


[edit]
now you get transfered to the team with least players.
Title: Re: Teamlock
Post by: A Sneaky Person on February 20, 2007, 06:56:32 pm
W00t thanks, i just dont really know how to import it into the game *is stupid*
Title: Re: Teamlock
Post by: FliesLikeABrick on February 20, 2007, 07:10:58 pm
Is it possible to set him back to his original team when he tries to switch, instead of switching him to spectators?  Switching him to spectators isn't really fair to the rest of the people on his team, since they then have one less person
Title: Re: Teamlock
Post by: mikembm on February 21, 2007, 12:36:49 am
Too bad OnJoinTeam isn't called when /setteam is used :(
Title: Re: Teamlock
Post by: Avarax on February 21, 2007, 12:03:10 pm
Too bad OnJoinTeam isn't called when /setteam is used :(

OnCommand
begin
  text2:=copy(text,1,8);
  If text2 = '/setteam' then
    OnJoinTeam(IDtoIP(ID),IDtoName(ID),GetPlayerStat(ID,'Team'));
end;

i guess that should work ;Q

@SK: i think you should add an option in the settings.ini called MoveTo = X were X can be 0-5. 0 would mean, that the person is moved back to the previous team, and all the other numbers (1-5) would move him back to the team with number X
Title: Re: Teamlock [update]
Post by: Serial K!ller on February 21, 2007, 02:31:52 pm
Too bad OnJoinTeam isn't called when /setteam is used :(
only admins can use that command so it's not so bad... even can be useful.


@FLAB and Avarax:
made it so you get transfered to the team with last players.