MySql Problem
#5

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 :
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;
}
Reply


Messages In This Thread
MySql Problem - by ColdRain - 17.05.2012, 13:12
Re: MySql Problem - by Mandrakke - 17.05.2012, 13:14
Re: MySql Problem - by ColdRain - 17.05.2012, 13:20
Re: MySql Problem - by Mandrakke - 17.05.2012, 13:25
Re: MySql Problem - by Shabi RoxX - 17.05.2012, 13:49
Re: MySql Problem - by Mandrakke - 17.05.2012, 13:55
Re: MySql Problem - by ColdRain - 17.05.2012, 14:22
Re: MySql Problem - by ColdRain - 17.05.2012, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)