Contas reseta do nada.. -
PetterAdriano - 13.01.2014
Bom pessoa nгo sei o que fazer , do nada as contas dos players do meu servidor reseta do nada, meu sistema de salvamento й dof2 e eu nгo sei o que fazer , Muitos vгo dizer " A gente nгo tem bola de cristal " Bom se alguйm saber qual pode ser o motivo por favor me digam.
Re: Contas reseta do nada.. -
RiqueP - 13.01.2014
Poem o sistema ae pra mim ver =D
Re: Contas reseta do nada.. -
kevinho.007 - 13.01.2014
coloca a public ou stock dos arquivos de salvamento.
Re: Contas reseta do nada.. -
PetterAdriano - 13.01.2014
PHP код:
OnPlayerSave(playerid);
public OnPlayerSave(playerid)
{
format(String,sizeof(String),"Contas/%s.ini",PlayerNick(playerid));
if(!DOF2_FileExists(String)) { return 1; }
if(DOF2_FileExists(String) && JogadorLogado[playerid] == true)
{
DOF2_SetInt(String,"Dinheiro",GetPlayerMoney(playerid));
DOF2_SetInt(String,"NivelAdmin",Player[playerid][qAdmin]);
DOF2_SetInt(String,"Matou",Player[playerid][qMatou]);
DOF2_SetInt(String,"Morreu",Player[playerid][qMorreu]);
DOF2_SetInt(String,"Char",Player[playerid][qSkin]);
DOF2_SetInt(String,"Level",GetPlayerScore(playerid));
DOF2_SetInt(String,"Sexo",Player[playerid][qSexo]);
DOF2_SetInt(String,"Tutorial",Player[playerid][qTut]);
DOF2_SetInt(String,"LicencaAero",Player[playerid][qLicAero]);
DOF2_SetInt(String,"LicencaBarco",Player[playerid][qLicBarco]);
DOF2_SetInt(String,"LicencaMoto",Player[playerid][qLicMoto]);
DOF2_SetInt(String,"LicencaCarro",Player[playerid][qLicCarro]);
DOF2_SetInt(String,"LicencaCamOni",Player[playerid][qLICamOni]);
DOF2_SetInt(String,"LicencaArma",Player[playerid][qLicArma]);
DOF2_SetInt(String,"EstiloLuta",Player[playerid][qLuta]);
DOF2_SetInt(String,"Organizacao",Player[playerid][qOrganizacao]);
DOF2_SetInt(String,"CargoORG",Player[playerid][qCargo]);
DOF2_SetInt(String,"GPS",Player[playerid][qGPS]);
DOF2_SaveFile();
}
return 1;
}
Re: Contas reseta do nada.. -
kevinho.007 - 14.01.2014
testa assim
//olha o ongamemodeexit
for(new i=0; i<MAX_PLAYERS; ++i) OnPlayerSave(i);
DOF2::Exit();
//=================================
//ONPLAYERDISCONNECT
if(JogadorLogado[playerid])
{
OnPlayerSave(playerid);
}
//=================================
public OnPlayerSave(playerid)
{
new String[100];
format(String,sizeof(String),"Contas/%s.ini",PlayerNick(playerid));
DOF2_SetInt(String,"Dinheiro",GetPlayerMoney(playe rid));
DOF2_SetInt(String,"NivelAdmin",Player[playerid][qAdmin]);
DOF2_SetInt(String,"Matou",Player[playerid][qMatou]);
DOF2_SetInt(String,"Morreu",Player[playerid][qMorreu]);
DOF2_SetInt(String,"Char",Player[playerid][qSkin]);
DOF2_SetInt(String,"Level",GetPlayerScore(playerid ));
DOF2_SetInt(String,"Sexo",Player[playerid][qSexo]);
DOF2_SetInt(String,"Tutorial",Player[playerid][qTut]);
DOF2_SetInt(String,"LicencaAero",Player[playerid][qLicAero]);
DOF2_SetInt(String,"LicencaBarco",Player[playerid][qLicBarco]);
DOF2_SetInt(String,"LicencaMoto",Player[playerid][qLicMoto]);
DOF2_SetInt(String,"LicencaCarro",Player[playerid][qLicCarro]);
DOF2_SetInt(String,"LicencaCamOni",Player[playerid][qLICamOni]);
DOF2_SetInt(String,"LicencaArma",Player[playerid][qLicArma]);
DOF2_SetInt(String,"EstiloLuta",Player[playerid][qLuta]);
DOF2_SetInt(String,"Organizacao",Player[playerid][qOrganizacao]);
DOF2_SetInt(String,"CargoORG",Player[playerid][qCargo]);
DOF2_SetInt(String,"GPS",Player[playerid][qGPS]);
DOF2_SaveFile();
return 1;
}