Author Topic: Making an entire team not to spawn  (Read 1011 times)

0 Members and 1 Guest are viewing this topic.

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Making an entire team not to spawn
« on: January 07, 2008, 08:24:34 pm »
Hello!

I'm absolutely new to soldat scripting, but not to programming in general - so I hope to come up with some neat additions to the soldat servers soon :)

I have 2 questions:
1. How do I turn off the general chat, but still allowing team chat?
2. How do I make one team not spawn, when the other team is allowed to spawn?

Thanks in advance!
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Making an entire team not to spawn
« Reply #1 on: January 07, 2008, 09:13:06 pm »
I don't believe either of those are possible. You could kill players as they respawn perhaps, but it's a bit of a workaround.

Offline toRch

  • Major
  • *
  • Posts: 55
  • <3
Re: Making an entire team not to spawn
« Reply #2 on: January 07, 2008, 10:03:11 pm »
Question is: what do you want to achieve not letting them spawn?/not allowing general chat?
If you explained that we could maybe help you.
Perhaps switching that specific team to spec or something like that would help?

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Making an entire team not to spawn
« Reply #3 on: January 07, 2008, 11:10:32 pm »
Thanks for your fast answers

This was the best way I could think of solving my problem, but you may just have another that's better. So what I want to achieve:

If you have played Quake 3 there is a playing mode called Tournament. In tournament mode 2 players play 1v1 and the rest waits as spectators (spectators and players have different chats so specs cant spy). The competing players play one match, and after a winner is announced, the looser is placed last in the spectator que, and the winner stays to fight the next person in que. It quite reminds of the old game 'King of the hill'.

Do you think this would be possible to script?
The que could be solved with setting the frags on each player (thus using soldats own way of organizing players in the score table (the one you see when you press F1). But then there is the chat and the respawn.. maby you can think of something better than me?

Thanks for your help so far, and thank in advance!
« Last Edit: January 07, 2008, 11:13:14 pm by rhide »
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Making an entire team not to spawn
« Reply #4 on: January 08, 2008, 06:31:06 am »
For the chat:

Use Command('/gmute ' + inttostr(ID)); on everyone. Then in OnPlayerSpeak, add a loop that is triggered everytime someone chats and sends that chat to all teammembers by checking teams with GetPlayerStat(ID,'Team') and then WriteConsole.


For not spawning:

Simply save their previous team in a variable and then set them to spectators (Command('setteam5 ' + inttostr(ID));) on death or whenever you want. Then, on another event, set them back to their previous team
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Making an entire team not to spawn
« Reply #5 on: January 08, 2008, 06:33:13 am »
The only way that I can think of of disabling chat would be gmute, but that also disables team chat i think.

And having a team lock system would work..
OnTeamChange(Id, Team: byte); begin if ((Team <> Lock[Id]) and (Team <> 5)) then begin Command('/setteam' + InttoStr(Lock[Id]) + ' ' + InttoStr(Id)); WriteConsole(Id, 'You are locked on ' + TeamNamebyNum(Lock[Id]) + ' team.', $FFFFFFFF); end; end;

EDIT:
Avarax: Doesn't the Text parameter mess up when a player is gmuted?

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: Making an entire team not to spawn
« Reply #6 on: January 08, 2008, 08:10:02 am »
when you gonna finally do it you can use my quake script (beta version released, but there are 2 bugs...)
I'm going to write Tibia for Soldat

Offline toRch

  • Major
  • *
  • Posts: 55
  • <3
Re: Making an entire team not to spawn
« Reply #7 on: January 08, 2008, 10:34:47 am »
EDIT:
Avarax: Doesn't the Text parameter mess up when a player is gmuted?
Yea thats true. I just tested it. Perhaps it's just me.
Next solution: when people join tell them they can't chat the actual way but rather need to /s <message>.
You could do that by drawtext. good luck!

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Making an entire team not to spawn
« Reply #8 on: January 13, 2008, 12:57:49 am »
Alright... sounds good to me

Thanks for all your support guys :) I'll try and get started - proboably a lot of newbie questions will pop up, but then again I know where to find you - thanks a lot!

Date Posted: January 08, 2008, 09:55:52 pm
I've started out with this script now and my progress have been pretty much successful I must say, for the first soldat script ever.

I decided it's proboably easiest and neatest to use deathmatch-mode instead of teamgame, and spectators instead of 2 teams where only 1 play. Now here's my question: Is it possible to change the order of the people in the spectator list? I couldnt do it by simply changing team and then back again, is there perhaps another way?

Thanks in advance!

Date Posted: January 11, 2008, 04:13:08 am
Ah! The progress seems very good so far :) I've got a well working que system, announcements system, sudden death system - it'll soon be ready to release!

Thank you all for supporting me, and specially thanks to [eC] for the GREAT scripting manual!
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai