Posts: 349
Threads: 119
Joined: Jun 2013
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.
Posts: 877
Threads: 6
Joined: Jan 2014
Reputation:
0
Poem o sistema ae pra mim ver =D
Posts: 86
Threads: 17
Joined: Apr 2012
Reputation:
0
coloca a public ou stock dos arquivos de salvamento.
Posts: 349
Threads: 119
Joined: Jun 2013
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;
}
Posts: 86
Threads: 17
Joined: Apr 2012
Reputation:
0
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;
}