Dialog login doesn't work
#5

Thanks, will be trying it. What did you actualy do?

EDIT:: THANKS it works now, but now i came across the problem that you can login with like any password if the password is like "example" you would be able to login with "ex"

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];
                GetPlayerName(playerid,PlayerName,sizeof PlayerName);
                format(file,sizeof file,"Admin/%s.ini",PlayerName);
                if(strlen(inputtext[PInfo[playerid][Password]])) {
                    INI_Open(file);//Opening the file with SII include
                    INI_ReadString(inputtext[PInfo[playerid][Password]],"Password");
                    PInfo[playerid][Registered] = INI_ReadInt("Registered");
                    PInfo[playerid][Level] = INI_ReadInt("Level");//Setting the admin level variable, to the one thats in his file.
                    PInfo[playerid][Score] = INI_ReadInt("Score"); // Setting the score of player
                    PInfo[playerid][Money] = INI_ReadInt("Money"); // Setting the money of player
                    PInfo[playerid][Operator] = INI_ReadInt("Operator");
                    INI_Close();//"Closing the file", that means that we're not using it anymore :P
                    SendClientMessage(playerid,-1,"You have been successfully logged in!");
                    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;
            }
        }
Reply


Messages In This Thread
Dialog login doesn't work - by Biess - 21.12.2012, 17:45
Re: Dialog login doesn't work - by Djole1337 - 21.12.2012, 17:56
Re: Dialog login doesn't work - by Biess - 21.12.2012, 20:41
Re: Dialog login doesn't work - by [HK]Ryder[AN] - 22.12.2012, 06:47
Re: Dialog login doesn't work - by Biess - 22.12.2012, 06:50

Forum Jump:


Users browsing this thread: 1 Guest(s)