Author Topic: Teamlock [update]  (Read 3870 times)

0 Members and 1 Guest are viewing this topic.

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Teamlock [update]
« 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.
« Last Edit: February 21, 2007, 02:32:51 pm by Serial K!ller »

Offline A Sneaky Person

  • Major(1)
  • Posts: 5
Re: Teamlock
« Reply #1 on: February 20, 2007, 06:56:32 pm »
W00t thanks, i just dont really know how to import it into the game *is stupid*

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Teamlock
« Reply #2 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

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Teamlock
« Reply #3 on: February 21, 2007, 12:36:49 am »
Too bad OnJoinTeam isn't called when /setteam is used :(

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Teamlock
« Reply #4 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
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: Teamlock [update]
« Reply #5 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.