But I don't know where to start, wich hook use or what function call..
help ?
Assuming you want to reconnect to a server when you are disconnected, I am not sure if it is even possible since you can't run any relevant Lua code during the menu state (correct me if I am wrong). A more indepth explanation on what you want would be also nice
Something like that : Server Crash Menu & Auto Reconnection · gmodstore
You could have a net message be broadcasted every x seconds then once received on the client set a variable to RealTime() and do stuff from there
In that case, it probably shows the menu when the player's connection becomes unstable, you could try using Player/IsTimingOut and adding a certain delay to make sure the player is still timing out, then open the menu
I am well aware of that, but I cant think of any other way it could be done.
The current way is doing what Azzy said.
Make the server do a heartbeat every x seconds.
If the client doesn't get the given message after y seconds, start a countdown.
If countdown reaches 0. Try and reconnect.
Yeah I'm probably going to do that, thanks
Sorry, you need to Log In to post a reply to this thread.