SA-MP Forums Archive
Login problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Login problem (/showthread.php?tid=406865)



Login problem - McFellow - 11.01.2013

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;
}



Re: Login problem - park4bmx - 11.01.2013

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


Re: Login problem - McFellow - 11.01.2013

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