08.12.2016, 20:23
Good afternoon or good night, I'm trying to solve a rescue problem and I'm in doubt, using Dof2 is it necessary to skip the line? for example;
Why are you bringing me the following problem?
Incorrect mode:
Correct mode:
Rescue function I found I did not find the error, saves the account when the player disconnects from the server;
Quote:
/n |
Incorrect mode:
Код:
Senha = pVazio Personagem1 = Vazio Personagem2 = Vazio Personagem3 = Vazio
Код:
Senha = 123 Personagem1 = Vazio Personagem2 = Vazio Personagem3 = Vazio
PHP код:
stock SalvarConta(playerid)
{
new
str[40],
arquivo[100],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(arquivo, sizeof(arquivo), "Contas de Usuбrios/%s.ini", name);
DOF2_CreateFile(arquivo);
DOF2_SetString(arquivo, "Senha", Account[playerid][pSenha]);
DOF2_SetString(arquivo, "Personagem1", Account[playerid][pPersonagem1]);
DOF2_SetString(arquivo, "Personagem2", Account[playerid][pPersonagem2]);
DOF2_SetString(arquivo, "Personagem3", Account[playerid][pPersonagem3]);
DOF2_SaveFile();
return 1;
}