17.05.2012, 13:49
Use mysql_close(); in OnGameModeInt();
Best way is to make a cmd save your data and settimer to restart server and Mysql_close();
An example :
Best way is to make a cmd save your data and settimer to restart server and Mysql_close();
An example :
pawn Код:
CMD:gmx(playerid,params[])
{
if(GetP_VarInt(playerid,p_Adminlevel) > 4)
{
foreach(Player,i)
{
UpdatePlayer(i);
}
SendClientMessageToAll(C_WHITE,"Server Restarting in 1 minutes for Maintenance.");
TogglePlayerControllable(playerid, 0);
DeleteAllTextDraws();
SetTimer("RestartServer",12000,false);
}
return 1;
}
public RestartServer()
{
mysql_close();
GameTextForAll("~w~Server ReStarting",2000,0);
SendRconCommand("gmx");
return 1;
}