Closing the server problem. - 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)
+--- Thread: Closing the server problem. (
/showthread.php?tid=451572)
Closing the server problem. -
T-N-Z - 17.07.2013
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?
Re: Closing the server problem. -
gtakillerIV - 17.07.2013
How does it not shut down ?
Re: Closing the server problem. -
Aerotactics - 17.07.2013
It's because you're kicking all the players, not restarting the server.