19.12.2017, 18:23
PHP Code:
stock SalvarPlayer(playerid)
{
new Arquivo[40];
format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", PlayerName(playerid));
if(DOF2_FileExists(Arquivo))
{
DOF2_SetInt(Arquivo, "Level", PlayerInfo[playerid][pLevel]);
DOF2_SetInt(Arquivo,"AdminLevel",PlayerInfo[playerid][pAdmin]);
DOF2_SaveFile();
}
return 1;
}
stock CarregarPlayer(playerid)
{
new Arquivo[40];
format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", PlayerName(playerid));
if(DOF2_FileExists(Arquivo))
{
PlayerInfo[playerid][pLevel] = DOF2_GetInt(Arquivo, "Level");
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(Arquivo, "AdminLevel");
ResetPlayerMoney(playerid);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
DOF2_SaveFile();
}
return 1;
}