Mano, ainda nгo estб salvando, olha o meu comando e olha como eu estou salvando.
PHP код:
CMD:level(playerid)
{
SetPlayerScore(playerid, 10);
PlayerInfo[playerid][pLevel] = 10;
return 1;
}
stock SalvarPlayer(playerid)
{
new Arquivo[40], string[200],
dia,mes,ano,hora,mins,seg;
getdate(ano,mes,dia);
gettime(hora,mins,seg);
format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", NomePlayer(playerid));
if(DOF2_FileExists(Arquivo))
{
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
DOF2_SetInt(Arquivo, "Level", PlayerInfo[playerid][pLevel]);
DOF2_SetInt(Arquivo, "AdminLevel", PlayerInfo[playerid][pAdmin]);
DOF2_SetString(Arquivo,"Funcao",PlayerInfo[playerid][pFuncao]);
DOF2_SetInt(Arquivo,"DonateRank",PlayerInfo[playerid][pVIP]);
DOF2_SetInt(Arquivo,"ConnectedTime", PlayerInfo[playerid][pConnectTime]);
DOF2_SetInt(Arquivo,"Muted", PlayerInfo[playerid][pMuted]);
DOF2_SetInt(Arquivo,"Money", PlayerInfo[playerid][pCash]);
DOF2_SetInt(Arquivo,"Kills", PlayerInfo[playerid][pKills]);
DOF2_SetInt(Arquivo,"Deaths", PlayerInfo[playerid][pDeaths]);
DOF2_SetInt(Arquivo,"DiasVIP",PlayerInfo[playerid][pDiaVIP]);
DOF2_SetInt(Arquivo,"diasvip",PlayerInfo[playerid][pDiasvip]);
DOF2_SetInt(Arquivo,"MesVIP",PlayerInfo[playerid][pMesVIP]);
DOF2_SetInt(Arquivo,"AnoVIP",PlayerInfo[playerid][pAnoVIP]);
DOF2_SetInt(Arquivo,"Jailed", PlayerInfo[playerid][pJailed]);
DOF2_SetBool(Arquivo,"Observacao",PlayerInfo[playerid][pObservacao]);
DOF2_SetInt(Arquivo,"Avisos", PlayerInfo[playerid][pWarns]);
format(string, sizeof(string),"%02d/%02d/%d as %02d:%02d:%02d",dia,mes,ano,hora,mins,seg);
DOF2_SetString(Arquivo,"LU", string);
DOF2_SetInt(Arquivo,"AcP", PlayerInfo[playerid][pAcP]);
DOF2_SetBool(Arquivo,"Radio",PlayerInfo[playerid][pRadio]);
DOF2_SaveFile();
}
return 1;
}