Author Topic: server controling  (Read 960 times)

0 Members and 1 Guest are viewing this topic.

Offline A Sneaky Person

  • Major(1)
  • Posts: 5
server controling
« on: February 19, 2007, 10:13:39 am »
I was wondering if you can lock teams on a dedicated server.

I run a server that has Teammatch running and i want bravo to be lock because it has bots.

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: server controling
« Reply #1 on: February 19, 2007, 10:19:33 am »
You can write a script that changes everyone that tries to join bravo to spectator.

Offline A Sneaky Person

  • Major(1)
  • Posts: 5
Re: server controling
« Reply #2 on: February 19, 2007, 10:29:41 am »
im new at the whole admin thing with soldat, how would i make a script. could you help me or guide me to someone who can help.

ive downloaded a few scripts already but i have no clue how to import them so they acually work in the dedicated server.

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: server controling
« Reply #3 on: February 19, 2007, 12:30:36 pm »
1.Set you s**t in normal soldat.
2.Copy your soldat setting files (soldat.ini?)
3.Add maps and then add the names to the maplist.
4.Download ARSSE or similar to control the server
5.Load the script into the "on playerjoin event" (rightclick, edit, then paste the code)
6.Start server
7.Log in

Should be a matter of "
Pseudo code for an object orientated language (C++?, I'm not familar with the Soldat syntax to give you proper code for this):
if player.team=bravo then player.team=spectator
Actual code:
/say Bravo is for bots only"
-=Gradius wuz you=-

Offline A Sneaky Person

  • Major(1)
  • Posts: 5
Re: server controling
« Reply #4 on: February 19, 2007, 01:42:12 pm »
Thanks

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: server controling
« Reply #5 on: February 19, 2007, 02:40:46 pm »
this should work(edit in scripts/NetworkCore.pas of the dedicated server):

Code: [Select]
procedure OnJoinTeam(IP, Nickname: string;Team: byte);
begin

   
if Team = 2 then begin
    command('/setteam5 '+inttostr(NametoID(Nickname)));
    SayToPlayer(NametoID(Nickname),'Bravo team is locked');
end;


end;