[INI Problem] Password don't save
#8

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
If you need that code for anything at all, ******' statement still stands. Hash your passwords or god forbid if anyone finds out.

If you're going to learn, learn the right way. Use Whirlpool, or udb_hash or SOMETHING. (Preferably Whirlpool)

And just so you know:
pawn Код:
function LoadUser_pass(playerid,name[],value[])
Should be:
pawn Код:
function LoadUser_data(playerid, name[], value[])
Look over the y_ini tutorial thread next time, you would have easily found the error.
Okay, thanks, would it look like this?
pawn Код:
function LoadUser_data(playerid,name[],value[])
{
    /* added */INI_String("Password",Ino[playerid][pKey], 24); // Taken from LoadUser_pass
    INI_Int("Level",Info[playerid][pLevel]);
    INI_Int("ADMLvl",Info[playerid][pAdminZC]);
    INI_Int("AdminZC",Info[playerid][pLvlAdminZC]);
    INI_Int("BanAppealer",Info[playerid][pBanAppealer]);
    INI_Int("FactionModerator",Info[playerid][pFactionModerator]);
    INI_Int("GangModerator",Info[playerid][pGangModerator]);
    INI_Int("Helper",Info[playerid][pHelper]);
    INI_Int("ConnectedTime",Info[playerid][pConnectTime]);
    INI_Int("Registered",Info[playerid][pReg]);
    INI_Int("Sex",Info[playerid][pSex]);
    INI_Int("Age",Info[playerid][pAge]);
    INI_Int("Origin",Info[playerid][pOrigin]);
    INI_Int("Respect",Info[playerid][pExp]);
    INI_Int("Money",Info[playerid][pCash]);
    SetPVarInt(playerid, "Cash",Info[playerid][pCash]);
    INI_Int("Bank",Info[playerid][pAccount]);
    INI_String("IP", Info[playerid][pIP], 32);
    INI_Int("Kills",Info[playerid][pKills]);
    INI_Int("Deaths",Info[playerid][pDeaths]);
return 0;
}
And should I change this on login?
pawn Код:
/*From INI_ParseFile(UserPath(playerid), "LoadUser_pass", .bExtra = true, .extra = playerid);*/
/* into */
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
ї?
But I still think that the problem is here:
pawn Код:
function OnPlayerRegister(playerid, inputtext[])
{
    if(IsPlayerConnected(playerid))
    {
        new passita[24];
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
        format(passita, sizeof(passita), "%s", inputtext);
        printf(passita);
        INI_WriteString(File,"Password", passita); //udb INI_WriteInt(File,"Password",udb_hash(password));
        INI_Close(File);
        TotalRegister++;
        SendClientMessageEx(playerid, COLOR_YELLOW, "Cuenta registrada, se ha iniciado sesiуn automбticamente.");
        OnPlayerLogin(playerid);
    }
    return 1;
}
Thanks.
Reply


Messages In This Thread
[INI Problem] Password don't save - by Kemula - 11.06.2014, 07:20
Respuesta: Re: [INI Problem] Password don't save - by Kemula - 11.06.2014, 08:08
Respuesta: Re: [INI Problem] Password don't save - by Kemula - 11.06.2014, 08:40
Re: [INI Problem] Password don't save - by Threshold - 11.06.2014, 10:59
Re: [INI Problem] Password don't save - by Rittik - 11.06.2014, 11:23
Re: [INI Problem] Password don't save - by Threshold - 11.06.2014, 11:27
Re: [INI Problem] Password don't save - by DaniceMcHarley - 11.06.2014, 11:32
Respuesta: Re: [INI Problem] Password don't save - by Kemula - 11.06.2014, 11:38
Re: [INI Problem] Password don't save - by DaniceMcHarley - 11.06.2014, 11:43
Respuesta: Re: [INI Problem] Password don't save - by Kemula - 11.06.2014, 11:45

Forum Jump:


Users browsing this thread: 2 Guest(s)