So i got 2 servers up and running thats the easy part. but the host names is where i have the issue. I have the server.cfg for both servers into one file. and the resources into one folder. I need help making it so that the hostname changes for the port. I do not want 2 cfg files but i want 2 different names for the serves is there a way to make this happen?
Not without having a second config file.
False.
You can use +sv_hostname "Server name"
after executing the config file.
True. You can do that. But not of a pain. I’d have the main server.cfg then have like s1.cfg and s2.cfg where you can set convars, ports, name, player slots etc. Then exec server.cfg
and start all the scripts up… That’s the most practical for us. We have all that way through to S4. From tarining servers, to public ones. But your method would work.
Pfft FAXES always forgetting the +
you can do…
Okay Thanks!
so if i make another cfg i can just use the nested config and exec it?
Yeah. Use server.cdg as the nested and run say s1.cfg when starting the server. Have the basics in there that you don’t want global. Like ports, server name, any convars etc.
I can shoot you an example in the morning if you mention me here…
Alright.
You can do that in the CMD when executing the config also
can i invite you to my discord and screen share and you can tell me what i need to do this is so confusing.
Do you launch a .bat file to launch your server?
Yes.
//5char
Okay, if you edit that you will see you have +exec server.cfg
or so.
Well, you can also use commands like +sv_hostname "server name"
, +sv_maxClients 32
, +endpoint_add_tcp "localhost:30123"
, etc after executing your config file.
Like this?
No, you will need two batch files.
Oh
//5char
so one for each server
Server1.bat (for example) would be like this:
cd C:\FxServer\server
C:\FxServer\run.cmd +exec server.cfg
+sv_hostname "Server name"
+sv_maxClients 32
+endpoint_add_tcp "iphere:30101"
+endpoint_add_udp "iphere:30101"
Yes.
Got it. Is there anything i need to do with the CFG files??
No, I think leaving the commands in there should be fine as they are being changed once the config has been executed.