Need Help For A Server Setup Script
Cereal_KillR
Join Date: 2002-10-31 Member: 1837Members
<div class="IPBDescription">to quickly switch ffa/tourney mode...</div> ok here it is:
alias tournament "tmon"
alias "tmon" "rcon mp_tournamentmode 1; rcon say tournamentmode on; alias tournament tmoff"
alias "tmoff" "rcon mp_tournamentmode 0; rcon say FFA settings loaded; rcon sv_password none; alias tournament tmon"
Now from my POV, what it should do is on the first press, put tourneymode on, the server will say tournamentmode on.
The second press would put tournamentmode off, say FFA settings loaded and remove the password from the server.
But for some reason it serversays 3 times tournamentmode on or FFA settings loaded at a press, and it seems the rest doesn't do anything. does anyone know what is wrong and how to remedy to it?
until then I'll have to do everything manually <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
alias tournament "tmon"
alias "tmon" "rcon mp_tournamentmode 1; rcon say tournamentmode on; alias tournament tmoff"
alias "tmoff" "rcon mp_tournamentmode 0; rcon say FFA settings loaded; rcon sv_password none; alias tournament tmon"
Now from my POV, what it should do is on the first press, put tourneymode on, the server will say tournamentmode on.
The second press would put tournamentmode off, say FFA settings loaded and remove the password from the server.
But for some reason it serversays 3 times tournamentmode on or FFA settings loaded at a press, and it seems the rest doesn't do anything. does anyone know what is wrong and how to remedy to it?
until then I'll have to do everything manually <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
Comments
no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame
alias "w8" "wait; wait; wait; wait; wait; wait; wait; wait"
alias "w16" "w8; w8"
alias "w64" "w16; w16; w16; w16"
alias "w128" "w64; w64"
alias "w256" "w128; w128"
Try increasing wait times out until you get one to work.
no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Im pretty sure that's wrong.. setting it to none removes the password I do believe....
I'll try to put 100000 waits in between <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
edit: but do I have to put 256 of them??? <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
no clue what is wrong, but my suggestion is making all the rcon stuff into a .cfg file and just exec ingame <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Im pretty sure that's wrong.. setting it to none removes the password I do believe....
I'll try to put 100000 waits in between <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
edit: but do I have to put 256 of them??? <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Wrong, it sets the password to none.
here:
L 04/13/2003 - 14:59:57: Rcon: "rcon 1064088564 "**********" sv_password none" from "213.8.95.166:29365"
"sv_password" is "none"
and server is locked.
L 04/13/2003 - 15:00:59: Rcon: "rcon 1064088564 "**********" sv_password """ from "213.8.95.166:29365"
"sv_password" is ""
and server is unlocked <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
alias tournament "tmon"
alias "tmon" "rcon mp_tournamentmode 1; rcon say tournamentmode on; alias tournament tmoff"
alias "tmoff" "rcon mp_tournamentmode 0; rcon say FFA settings loaded; rcon sv_password none; alias tournament tmon"
Now from my POV, what it should do is on the first press, put tourneymode on, the server will say tournamentmode on.
The second press would put tournamentmode off, say FFA settings loaded and remove the password from the server.
But for some reason it serversays 3 times tournamentmode on or FFA settings loaded at a press, and it seems the rest doesn't do anything. does anyone know what is wrong and how to remedy to it?
until then I'll have to do everything manually <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Your general idea is correct, but there are a couple of choices that you can implement to change how to switch modes.
1) Modify you script
2) Make two files with scripts in them and use rcon to run them.
This is how I would modify your script.
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias tournament "tmon"
alias "tmon" "alias tournament tmoff";"rcon mp_tournamentmode 1; say tournamentmode on"
alias "tmoff" "alias tournament tmon"; "rcon mp_tournamentmode 0; say FFA settings loaded; sv_password none"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
I have no idea if this will work the way it should, but it seems like the problem is that you are calling an rcon command from inside an rcon command.
i.e.:
rcon "rcon say Hello World"
shouldn't produce the results you want, so I would basically strip the "excessive" rcons from your script. (as I said, I do not know if this will work)
2) Makeing two files is considerably easier to verify that the script works.
File 1 (called "tmon.cfg"):
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->mp_tournamentmode 1
say "tournamentmode on"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
File 2 (called "tmoff.cfg"):
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
"mp_tournamentmode 0
say FFA settings loaded
sv_password ""
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
Now upload these files to your ns directory/folder of your server and you can then use rcon to execute those scripts like so:
rcon exec tmon.cfg
rcon exec tmoff.cfg
if you want your aliases then you can simply do this:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias tournament "tmon"
alias "tmon" "alias tournament tmoff; rcon exec tmon.cfg"
alias "tmoff" "alias tournament tmon; rcon exec tmoff.cfg"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
Let me know if this helps.
<i>Pebbs</i>
thanks anyway...