Dialog Response Problem.
#7

I did this
pawn Код:
case DIALOG_LOGIN: {
            if ( !response ) return Kick (playerid);
            if( response ) {
                //if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                //if(strlen(PInfo[playerid][Password])) {
                new file[64], PlayerName[24], rank[24];
                GetPlayerName(playerid,PlayerName,sizeof PlayerName);
                format(file,sizeof file,"Admin/%s.ini",PlayerName);
                INI_Open(file);//Opening the file with SII include
                INI_ReadString(inputtext[PInfo[playerid][Password]],"Password");
                if(!strcmp(inputtext, PInfo[playerid][Password])) {
                    PInfo[playerid][Rank] = INI_ReadInt("Rank");
                    PInfo[playerid][Level] = INI_ReadInt("Level");//Setting the admin level variable, to the one thats in his file.
                    PInfo[playerid][Operator] = INI_ReadInt("Operator");
                    PInfo[playerid][Kills] = INI_ReadInt("Kills");
                    PInfo[playerid][Deaths] = INI_ReadInt("Deaths");
                    PInfo[playerid][Score] = INI_ReadInt("Score"); // Setting the score of player
                    PInfo[playerid][Money] = INI_ReadInt("Money"); // Setting the money of player
                    INI_Close();//"Closing the file", that means that we're not using it anymore :P
                    SendClientMessage(playerid,-1,"You have been successfully logged in!");
                    SendClientMessage(playerid, -1, rank);
                    PInfo[playerid][Logged] = 1;//Setting the logged in variable to 1
                    SetPlayerScore(playerid, PInfo[playerid][Score]);
                    GivePlayerMoney(playerid, PInfo[playerid][Money]);
                } else {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
But still doesn't work.
Reply


Messages In This Thread
Dialog Response Problem. - by Biess - 23.12.2012, 17:26
Re: Dialog Response Problem. - by Randy More - 23.12.2012, 18:23
Re: Dialog Response Problem. - by Biess - 23.12.2012, 18:35
Re: Dialog Response Problem. - by tyler12 - 23.12.2012, 18:37
Re: Dialog Response Problem. - by Biess - 23.12.2012, 18:40
Re: Dialog Response Problem. - by tyler12 - 23.12.2012, 18:42
Re: Dialog Response Problem. - by Biess - 23.12.2012, 18:53
Re: Dialog Response Problem. - by Biess - 24.12.2012, 08:23

Forum Jump:


Users browsing this thread: 5 Guest(s)