SA-MP Forums Archive
[HELP] mysql password - 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: [HELP] mysql password (/showthread.php?tid=495565)



[HELP] mysql password - Luca12 - 17.02.2014

Hello I was registered my acc with pass mark12 and when I get to the login part I enter the same password and it says that is password is incorect

Here's login part:

pawn Код:
if(dialogid == 1)
    {
        if(response)
        {
            if(strlen(inputtext) < MIN_DUZINA_LOZINKE || strlen(inputtext) > MAX_DUZINA_LOZINKE)
            {
                new LozinkaString[128];
                format(LozinkaString,sizeof LozinkaString,"*G-Unit: Lozinka ne smije biti manja od %d,a veca od %d!",MIN_DUZINA_LOZINKE,MAX_DUZINA_LOZINKE);
                SendClientMessage(playerid,0xDB023EFF,LozinkaString);
                new name[MAX_PLAYER_NAME],loginstring[512];
                GetPlayerName(playerid,name,sizeof(name));
                format(loginstring,sizeof(loginstring),"{00C0FF}_____________________________________\n\n{FFFFFF}Dobrodoљao na G-Unit RolePlay/Dm Server! {00C0FF}\n\n%s\n{FFFFFF}Vas je korisnicki racun pronadjen!\n\nMolimo upisi lozinku da udjes na server:\n{00C0FF}_______________________________________",name);
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Prijava",loginstring,"Logiraj","Izlaz");
                return 1;
            }
            new imex[MAX_PLAYER_NAME],Query[500];
            ImeIgraca(playerid,imex);
            new hashpass[129];
            WP_Hash(hashpass,sizeof(hashpass),inputtext);
            mysql_real_escape_string(inputtext,hashpass);
            format(Query,500,"SELECT `ID` FROM `users` WHERE `Nick` = '%s' AND `Password` = '%s'",imex,hashpass);
            mysql_query(Query);
            mysql_store_result();
            if(mysql_num_rows() > 0)
            {
                MySQL_Login(playerid);
            }
            else
            {
                new name[MAX_PLAYER_NAME];
                GetPlayerName(playerid,name,sizeof(name));
                new loginstring[512];
                format(loginstring,sizeof(loginstring),"{00C0FF}________________________________{F81414}\n[Greska] Unijeli ste kratku ili netocnu lozinku\n\n{FFFFFF}Vas je racun pronadjen!\n{00C0FF}%s\n\n{FFFFFF}Molimo upisite vasu lozinku:\n{00C0FF}_____________________________________",name);
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Prijava",loginstring,"Logiraj","Izlaz");
            }
            mysql_free_result();
        }
    }