14.07.2012, 21:52
hello,
How i can grant that all sql transactions finish until i execute rcon command gmx?
Im using MySQL Plugin R7 that using threads..
I have any form that know thread ids of unfinished transactions to wait for threads end with any function like pthread_join (like in c++)?
My command is:
But its logical that when server executes SendRconCommand("gmx") exists threads of sql querys that not finish and server restart, cancel threads and information aren't saved..
I have any way to resolve this?
Regards
How i can grant that all sql transactions finish until i execute rcon command gmx?
Im using MySQL Plugin R7 that using threads..
I have any form that know thread ids of unfinished transactions to wait for threads end with any function like pthread_join (like in c++)?
My command is:
Код:
CMD:ggmx(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
new string[128];
format(string, sizeof(string), "AdmCmd: %s has issued an instant server restart.", RPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
foreach(Player, i)
{
if(IsPlayerLoggedIn(i))
{
SaveChar(i);
}
}
SaveFactions();
SaveFamilies();
SavePoints();
SaveBiz();
SaveHouses();
SaveDoors();
SaveGates();
SaveMapIcons();
SaveArrestPoint();
SaveDrugs();
SaveMOTDS();
SendRconCommand("gmx");
return 1;
}
I have any way to resolve this?
Regards

