21.01.2013, 13:24
Mano eu vou tentar ajudar, nгo sei se estб certo, mas vamo lб...
Substitua esta callback e as funзхes:
Por isto:
OBS: Crie uma pasta "Contas" na pasta "Scriptfiles", senгo, nгo vai dar certo!
Espero que dк certo, depois fala aqui oque deu! (:
Substitua esta callback e as funзхes:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[64], name[24]; // We declare the size of the file
GetPlayerName(playerid,name, sizeof name); // We get the file name
format(file,sizeof file,DOF2_File(name));
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]); // We set/update the players settings.
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(file,sizeof(file),"Contas/%d.ini",name);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]);
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
}
else
{
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]);
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
}
return 1;
}
Espero que dк certo, depois fala aqui oque deu! (:

