SA-MP Forums Archive
Restarting server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Restarting server (/showthread.php?tid=273971)



Restarting server - Kingunit - 04.08.2011

<fixed>


Re: Restarting server - =WoR=Varth - 04.08.2011

I guess you save the donator thinghy inside OnPlayerDisconnect. "gmx" is bugged with it.
Move it or make costum "gmx"


Re: Restarting server - Kush - 04.08.2011

If your saving upon disconnect, make sure your GMX command, opens then writes the values then closes it before you implement the the GMX Function.


Re: Restarting server - Kingunit - 04.08.2011

<fixed>


Re: Restarting server - grand.Theft.Otto - 04.08.2011

I'm having the same problem with my drug saving system.

@Kush, I'm sure he is using the /rcon gmx and not his own command and so am I, so how would we edit it to write our values?

EDIT: nevermind, I saw varth said to make a custom /gmx. I am positive that will work instead of using /rcon gmx which corrupts everything.


Re: Restarting server - Scenario - 04.08.2011

Go ahead and create a custom function which will save a players information (if you haven't already). Execute this function as the first thing under "public OnGameModeExit()." That should solve the problem (it usually does for me).


Re: Restarting server - Kingunit - 04.08.2011

<fixed>


Re: Restarting server - Danny - 04.08.2011

Make an command just like Kush said to create an 'delayed restart':

Code:
CMD:restart(playerid, params[])
{
     SetTimer("Restarting",3000,0);
     SaveAllServerStats(); // or anything you use to save all stats
}

public Restarting()
{
      SendRconCommand("gmx");
}
Now, it saves the info before 'gmx' is called. This will give you a good result. But stop using /rcon gmx, it won't work then.


Re: Restarting server - Kingunit - 04.08.2011

Quote:
Originally Posted by -Danny-
View Post
Make an command just like Kush said to create an 'delayed restart':

Code:
CMD:restart(playerid, params[])
{
     SetTimer("Restarting",3000,0);
     SaveAllServerStats(); // or anything you use to save all stats
}

public Restarting()
{
      SendRconCommand("gmx");
}
Now, it saves the info before 'gmx' is called. This will give you a good result. But stop using /rcon gmx, it won't work then.
I don't use /rcon gmx, but I restart most of the time's my server is my control panel (ok probably the same as /rcon gmx)
But the system doens't save it good, I check now everything and check when it doens't save. Sometimes when I leave the server it is saving. But now when I login again (1day later) it's gone again. I try to modify my user file and test it again. Maybe it's just my /makedonate command.


Re: Restarting server - Kush - 04.08.2011

Quote:
Originally Posted by grand.Theft.Otto
View Post
I'm having the same problem with my drug saving system.

@Kush, I'm sure he is using the /rcon gmx and not his own command and so am I, so how would we edit it to write our values?

EDIT: nevermind, I saw varth said to make a custom /gmx. I am positive that will work instead of using /rcon gmx which corrupts everything.
He's not using RCON to GMX.