How to get cl_timeout 600 to run clients on join.

Alright is there away that i can make my players time out time really high so that when my server crashes or restartes they wont be disconnected before the auto reconnect reconnects them to the server?

i thought about adding

RunConsoleCommand(“cl_timeout 600”) end)

into autorun/client but not sure if it would work?

and is there away it can be auto set back if they leave?

RunConsoleCommand takes varargs for argument, meaning you have to separate the command from the setting; and no, there isn’t a reliable way to set it back when they leave in the case that they or the server crashes.

First, you shouldn’t be modifying client settings.

Secondly, this wont do anything because if the server crashes or restarts the server wont think anyone is connected. The client will never just start working again. They MUST reconnect when the server is restarted for any reason.

There is away to make a client reconnect if the server isnt connected and setting the players time out high helps insure it works because the reconnect thing i have opens a webpage that will send console commands after the server comes back online to connect but it didn’t at the time set the players time out. but as of now putting RunConsoleCommand(“cl_timeout”, 600) in the auto run of the script that launches the screen that pops up it works perfectly.

That’s only if the server is lagging out, which should never happen for more than five seconds. If the server crashes or restarts, then the timeout won’t actually do anything. There is a way to make a player reconnect to the server if it does restart, but you probably aren’t looking for that.