GMX Command
#1

Hi guys. I have a couple of questions for you.

1. What exactly does a rehash command do and what functions does it use ?

2. Any ideas on how I could make a /gmx command to restart the server without the players having to leave it ?(I'm sure it is possible)

3. What is the difference between a rehash(where you have to relog to get back on the server) and a GMX(where you don't have to leave the server) command ?

Thanks in advance!

PS: I don't want any scripts! Just ideas on what functions/callbacks to use.
Reply
#2

Rehash gives the opportunity to save player data at the exact moment(most of the times by kicking everyone), there's no command for it though you can loop through players and kick everyone.

Gmx command is quite easy, all you have to do is notify your players that it's a GMX and not their internet acting up, what I did was to check how long the gmx lasts and for ex; 15 seconds( mine was a little bit longer )
There's a couple things you can do to notify the players. 1; make a couple textdraws that covers the entire screen and text that says "Server is restarting, reconnecting is not needed!" and hide it when gamemode is back on(didnt try this out).
Another thing you can do is use gametexts, they continue until the end of the time you insertes(i am currently using this), preferably type 0 because it has a big fontsize and pops up in the middle of the screen.
SADLY it is not possible to gmx without the players leaving, just follow the steps i said above

Rehash command = kick everyone and by kicking everyone you force their data to be saved, so no data can be lost
GMX probably has no data saving in its callback(OnGameModeExit), you should have it just in case, and it forces the gamemode to exit and load
Reply
#3

Yeah ,thanks , that's how I just made it.

I notify the players using a global client message and a gametext then I call the gmx function I made. The server restarts fine and saves everything.

Thanks for your answer.
Reply
#4

Yeah, no worries
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)