Server shuts down randomly
#1

Well I'm not sure what the problem is, But the server would randomly just /gmx itself and then start up but it gets annoying because it happens once in a while. Is there anyway to could fix this? My plugins and includes are all updated, I run on a Linux Server and the log doesn't really state anything that could help me solve the problem.
Reply
#2

Can you show me the /gmx command function? And also, what Streamer version are you using?
Reply
#3

I believe the streamer version is the latest one. If you would like the server.log of when I start the server just ask in a reply. And here is my /gmx command.

Код:
	if(strcmp(cmd, "/gmx", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
				GameModeInitExitFunc();
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
			}
		}
		return 1;
And Just incase i listed the GameModeInitExitFunc

Код:
public GameModeInitExitFunc()
{
    gmx = 1;
	new string[128];
	format(string, sizeof(string), "Restarting! Please Wait");
	//foreach(Player, i)
	for(new i; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			OnPlayerSave(i);
			DisablePlayerCheckpoint(i);
			GameTextForPlayer(i, string, 4000, 5);
			SetPlayerInterior(i, 0);
			SetPlayerVirtualWorld(i, 0);
			SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
			SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
			gPlayerLogged[i] = 0;
		}
	}
	SaveFamilies();
	SaveCar();
	SaveHouse();
	SaveBiz();
	//Speedo
	for(new i=0; i<PLAYERS; i++)
    {
	   	TextDrawHideForPlayer(i, LBox[i]);
		TextDrawHideForPlayer(i, LLine1[i]);
		TextDrawHideForPlayer(i, LLine2[i]);
		TextDrawHideForPlayer(i, LLine3[i]);
		TextDrawHideForPlayer(i, LLine4[i]);
		TextDrawHideForPlayer(i, LCredits[i]);
		TextDrawHideForPlayer(i, Lmph[i]);
		TextDrawHideForPlayer(i, LFunc[i]);
	}
	for(new n = 0; n < MAX_VEHICLES; n++)
	{
		if(CarInfo[n][Neon] == 1)
		{
			DestroyObject(ObjectSelect[n][0]);
			DestroyObject(ObjectSelect[n][1]);
		}
	}
	//
	SetTimer("GameModeExitFunc", 4000, 0);
	return 1;
}
Reply
#4

Well check your brackets throughout the script, other than that it must be either a network error or function error.
Best of luck to you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)