Login problem
#1

So I have registered a account I relogged tried to logging but when I type the same password it says invalid password then I have to delete my account again any idea's?
Here is my login
pawn Код:
case DIALOG_LOGIN: {

            if(response) {

                new
                    playerName[MAX_PLAYER_NAME],
                    escapedPassword[129],
                    escapedPlayerName[MAX_PLAYER_NAME];

                GetPlayerName(playerid, playerName, sizeof(playerName));

                WP_Hash(escapedPassword, sizeof(escapedPassword), inputtext);
                mysql_real_escape_string(playerName, escapedPlayerName);

                format(szQueryInput, sizeof(szQueryInput), "SELECT * FROM `accounts` WHERE `username` = '%s' AND `password` = '%s' LIMIT 0,1", escapedPlayerName, escapedPassword);
                mysql_function_query(connection, szQueryInput, true, "LoadPlayerData", "is", playerid, escapedPlayerName);

            }
            else
            {
                SendClientMessage(playerid, COLOR_BRIGHTRED, "[SERVER]: {FFFFFF}You have to login in your account in order to play in McFellow's RP.");
                Kick(playerid);
            }

            return 1;
        }

    }

    return 0;
}
Reply
#2

I don't see the message that will be returned when your pass don't math.
But also your only loading the playerusernsme not the password as well
You only give the paramiters playerid and escapedPlayerName
But don't see escapedPassword gettings passed on
Reply
#3

Can you help me with making it? (Just followed a tutorial how to make that)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)