05.11.2012, 00:39
Actually the problem is, that OnPlayerDisconnect gets called, but it get's called too late.
pawn Code:
new GMX = 0;//On top of script
CMD:gmx(playerid, params[])
{
//blah blah
GMX = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SavePlayerData(i);
}
}
}
public OnPlayerDisconnect(playerid)
{
if(GMX == 0)
{
SavePlayerData(playerid);
}
return 1;
}

