1 error.
#6

Quote:
Originally Posted by UploaD
Посмотреть сообщение
Try this

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case  DialogReg:
        {
            if(!response) return Kick(playerid);
            if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, DialogReg, DIALOG_STYLE_INPUT, "Register", "{FF0000}Your passwords has to be atleast 6 characters long!\nPlease put your password below", "Register", "Bye");
            if(response)
            {
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File, "Information");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File, "Cash", 0);
                INI_WriteInt(File, "Admin", 0);
                INI_WriteInt(File, "Kills", 0);
                INI_WriteInt(File, "Deaths", 0);
                INI_WriteInt(File, "Score", 0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DialogRegSuccess, DIALOG_STYLE_INPUT, "Successfully registered!", "You have successfully registered an account! Please relog to save your stats.", "Ok", "");
            }
        }
        case DialogLog:
        {
            if(!response) return Kick(playerid);
            if(response)
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][Password])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][Cash]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
                    ShowPlayerDialog(playerid, DialogLogSuccess, DIALOG_STYLE_INPUT, "Success", "You have successfully logged in! Enjoy playing", "Okay", "");
                }
                else
                {
                    ShowPlayerDialog(playerid, DialogLog, DIALOG_STYLE_INPUT, "Wrong password", "{FF0000}You have entered incorrect password", "Login", "Bye");
                }
            }
        }
    }
    return 1;
}
ooh finally thanks
Reply


Messages In This Thread
1 error. - by Glossy42O - 04.01.2015, 14:00
Re: 1 error. - by DavidBilla - 04.01.2015, 14:08
Re: 1 error. - by Glossy42O - 04.01.2015, 14:43
Re: 1 error. - by UploaD - 04.01.2015, 14:53
Re: 1 error. - by Dignity - 04.01.2015, 14:53
Re: 1 error. - by Glossy42O - 04.01.2015, 14:55
Re: 1 error. - by UltraScripter - 04.01.2015, 14:57
Re: 1 error. - by Glossy42O - 04.01.2015, 15:04
Re: 1 error. - by UploaD - 04.01.2015, 15:14
Re: 1 error. - by Glossy42O - 04.01.2015, 15:17

Forum Jump:


Users browsing this thread: 1 Guest(s)