%s.ini file writes twice!
#9

Code:
    if(dialogid == dlogin)
    {//then
        if(!response) return Kick(playerid);
        if(response)
        {//then
            new hashpass[129];
            WP_Hash(hashpass,sizeof(hashpass),inputtext);
            if(!strcmp(hashpass,pInfo[playerid][Pass]))
            {//then
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
                SetPlayerScore(playerid,pInfo[playerid][Score]);
                GivePlayerMoney(playerid,pInfo[playerid][Money]);
                SendClientMessage(playerid,-1,"{c3c3c3}(INFO) You have successfully logged in! You can start playing now.");
            }
            else
            {//then
                ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Account","{FF0000}You have entered a wrong password! Please try again.","Login","Quit");//We will tell to them that they've entered an incorrect password
                return 1;
            }
        }
    }
    return 1;
}
Code:
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("Admin",pInfo[playerid][Admin]);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Score",pInfo[playerid][Score]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    return 1;
}
Reply


Messages In This Thread
%s.ini file writes twice! - by ivndosos - 25.01.2018, 08:42
Re: %s.ini file writes twice! - by Meller - 25.01.2018, 09:29
Re: %s.ini file writes twice! - by ivndosos - 25.01.2018, 09:40
Re: %s.ini file writes twice! - by Sew_Sumi - 25.01.2018, 09:43
Re: %s.ini file writes twice! - by ivndosos - 25.01.2018, 09:45
Re: %s.ini file writes twice! - by Meller - 25.01.2018, 10:14
Re: %s.ini file writes twice! - by ivndosos - 25.01.2018, 11:53
Re: %s.ini file writes twice! - by Sew_Sumi - 25.01.2018, 12:31
Re: %s.ini file writes twice! - by ivndosos - 25.01.2018, 13:17
Re: %s.ini file writes twice! - by Meller - 25.01.2018, 14:02
Re: %s.ini file writes twice! - by Sew_Sumi - 25.01.2018, 15:57

Forum Jump:


Users browsing this thread: 2 Guest(s)