Login Problem MySQL
#1

It gives me wrong password but the password is correct . Please some help

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == LogDialog)
{
       if (!response)
           return Kick(playerid);
new lPassword[25];
  new rString[1024];
if (sscanf( inputtext, "s[25]", lPassword))
   return ShowPlayerDialog(playerid, LogDialog, DIALOG_STYLE_PASSWORD, "Login Account", ""W"Please login into your account\n"W"Put your password what do you use it when you register your account:", "Login", "Kick" );
          new	Buf[129];
WP_Hash(Buf, 129, lPassword);
format(rString, sizeof rString, "SELECT * FROM `accounts` WHERE `username` = '%s' AND `password` = '%s' LIMIT 1", PlayerName2( playerid ), Buf);
mysql_query(rString, CHECK_PASSWORD, playerid , CGRData);
return 1;
}
return 1;
}
Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
switch(resultid)
{
case CHECK_PASSWORD:
{
new Query[ 512 ];
mysql_store_result();
if(mysql_num_rows() != 0)
{
  mysql_free_result( );
format( Query, sizeof( Query ), "SELECT * FROM `accounts` WHERE `username` = '%s'", PlayerName2( extraid ) );
mysql_query( Query, ACCOUNT_LOGIN, extraid ,CGRData);
  GameTextForPlayer( extraid, "~n~~b~~h~successfully logged in", 3000, 4 );
AccInfo[extraid][LoggedIn] = 1;
}
else
{
   new gsString[512];
   mysql_free_result( );
AccInfo[ extraid ][ FailLogin ]++;
if ( AccInfo[ extraid ][ FailLogin ] == MAX_FAIL_LOGINS )
   {
           format( gsString, sizeof( gsString ), "*** {00FF00}%s(%d) {ACACAC}has been kicked. Reason: {00FF00}Failed Logins!", PlayerName2( extraid ), extraid );
           SendClientMessageToAll( COLOR_GREY, gsString );
           Kick( extraid );
   }
   format( gsString, sizeof gsString, ""R"You entered the wrong password.\nWrong Password attemps '"W"%d/3'", AccInfo[ extraid ][ FailLogin ] );
   ShowPlayerDialog( extraid, LogDialog, DIALOG_STYLE_PASSWORD, ""B"Login Account", gsString, "Login", "Kick" );
}
mysql_free_result();
return 1;
}
}
return 1;
}
Код:
[20:39:52] [DEBUG] >> mysql_query_callback(Connection handle: 1)
[20:39:52] [DEBUG] ProcessQueryThread(OnQueryFinish) - Executing query SELECT * FROM `accounts` WHERE `username` = 'Gh0s7.' AND `password` = 'FE6E035C15092D35DB9BBDE020DDE741482617F66024C20088569CAE8CEEDEE0A1D6CB43B34009CDF773BDF304947615ABBE7FEDBC456B73F241BABB85FB48B7' LIMIT 1...
[20:39:52] [DEBUG] ProcessQueryThread(OnQueryFinish) - Query was successful.
[20:39:52] [DEBUG] ProcessQueryThread(OnQueryFinish) - Data being passed to ProcessTick().
[20:39:52] [DEBUG] OnQueryFinish(siii) - Callback is being called...
[20:39:52] [DEBUG] >> mysql_store_result(Connection handle: 1)
[20:39:52] [DEBUG] CMySQLHandler::StoreResult() - Result was stored.
[20:39:52] [DEBUG] >> mysql_num_rows(Connection handle: 1)
[20:39:52] [DEBUG] CMySQLHandler::NumRows() - Returned 0 row(s).
[20:39:52] [DEBUG] >> mysql_free_result(Connection handle: 1)
[20:39:52] [DEBUG] CMySQLHandler::FreeResult() - Result was successfully freed.
[20:39:52] [DEBUG] >> mysql_free_result(Connection handle: 1)
[20:39:52] [WARNING] CMySQLHandler::FreeResult() - The result is already empty.
Reply
#2

Up , please help
Reply
#3

Up...
Reply
#4

Up (
Reply
#5

Up again, seriously anyone? )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)