08.03.2015, 16:34
When a player disconnects from my server then reconnects his stats all go to 0 except his password and level and he also spawns in BlueBerry not where he logged off, why?
Код:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open( user_account_path ( playerid ) );
INI_SetTag(File, "statistics" );
INI_WriteInt(File, "Level", GetPlayerScore( playerid ) );
INI_WriteInt(File, "Admin", PlayerInfo[ playerid ][ pAdmin ]);
INI_WriteInt(File, "RespectPoints", PlayerInfo[ playerid ][ pConnectTime ]);
INI_WriteInt(File, "Registered", PlayerInfo[ playerid ][ pReg ]);
INI_WriteInt(File, "Gender", PlayerInfo[ playerid ][ pSex ]);
INI_WriteInt(File, "Age", PlayerInfo[ playerid ][ pAge ]);
INI_WriteInt(File, "Cash", PlayerInfo[ playerid ][ pCash ]);
INI_WriteInt(File, "Tutorial", PlayerInfo[ playerid ][ pTut ]);
INI_WriteInt(File, "Job", PlayerInfo[ playerid ][ pJob ]);
INI_WriteInt(File, "Tutorial", Tutorial[playerid]);
INI_Close(File);
Tutorial[playerid] = 0;
}
return 1;
}

