09.02.2016, 21:30
Код:
public OnPlayerDisconnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
GetPlayerPos(playerid, Player[playerid][pX], Player[playerid][pY], Player[playerid][pZ]);
format(arquivo, 40, "Contas/%s.ini", name);
if(DOF2_FileExists(arquivo))
{
Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
DOF2_SetFloat(arquivo, "pX", Player[playerid][pX]);
DOF2_SetFloat(arquivo, "pY", Player[playerid][pY]);
DOF2_SetFloat(arquivo, "pZ", Player[playerid][pZ]);
DOF2_SaveFile();
}
return 1;
}

