Closing the server problem.
#1

Hello all, I have a weird issue, I have this very simple command, and I have no idea why it dosen't work properly anymore. I mean seriously, it's that simple:

Код:
COMMAND:restart(playerid, params[])
{
	if(PlayerInfo[playerid][pLogged] == 0) return NotLogged(playerid);
	if(PlayerInfo[playerid][pAdmin] < 5) return OnlyAdmins(playerid); // checks if player is admin...

	
	foreach(Player, i)
	{
  	    Kick(i);
        }
    
        SendRconCommand("exit");
	
	return true;
}
Supposedly it kicks everyone, which is fine, but after it sends "exit" command, server gets completly frozen. Players still appear online, and it won't shutdown.
Is that a SA-MP bug, or there's something wrong on my end? I am running my server on Debian system, I am tired of connecting to SSH to restart it everytime, I made a crontab, but now I can't get server to shutdown by using /restart

Any ideas?
Reply
#2

Quote:

and it won't shutdown.

How does it not shut down ?
Reply
#3

It's because you're kicking all the players, not restarting the server.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)