If I were to launch srcds.exe with some command line args is it possible to read them in Lua? So for example when a server start I could parse a unique instance ID to that server (Not the only reason I need it though)?
maybe a convar archived?
I would love to read rcon passwords too
wot? I was trying to create something that automaticly started and stopped servers, But each server needed a unique ID each time they start and the best way i could think to parse it would be in the command line?
If someone is able to run Lua on your server, you’re already fucked.
do it like other systems do, add them in a sql database and give them an auto-increment var as ID, and then set it inside your lua config.
What I do on my multi-server system thing is basically this. I give each server a set port - then add the port to a database and give the server an ACTUAL unique id.
id int, address varchar(255), active int
1 XXX.XXX.XXX.XXX:27020 1
Then on server startup, query the database and get their unique ID.
That’s what I was looking for, Your the man. Thanks.