SA-MP Forums Archive
Whirlpool hash and login dialog - 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: Whirlpool hash and login dialog (/showthread.php?tid=413780)



Whirlpool hash and login dialog - Hyperfire - 06.02.2013

Hey guys, I've been working on a gamemode for about a week now, everything seemed to be going to plan untill I accidentally entered a incorrect password and found that I can login with any password. I then folowed a tutorial that helped me clean/fix some code. But now I can't login with even the correct passeword DERP! As the title stated I'm using whirlpool to hash my passwords and then save it to a file with Y_ini. I only have problems logging in, all the other code seem to be working fine.

I'll be happy to provide code, just tell me which ones.

Thanx in advance.


Re: Whirlpool hash and login dialog - Franx - 06.02.2013

No code no help mate


Re: Whirlpool hash and login dialog - Scrillex - 06.02.2013

You uesd tutorial right? Then read this!


https://sampforum.blast.hk/showthread.php?tid=352703

Ant the end of script is told:

Quote:

loadaccount_%s
//to
loadaccount_user




Re: Whirlpool hash and login dialog - T0pAz - 06.02.2013

Probably you are not putting the correct buffer. Show your code atleast.


Re: Whirlpool hash and login dialog - Hyperfire - 06.02.2013

Quote:
Originally Posted by Scrillex
View Post
You uesd tutorial right? Then read this!


https://sampforum.blast.hk/showthread.php?tid=352703

Ant the end of script is told:
Yeah that is the tutorial I followed to fix some of my code, though at the top is written to read at the bottom. Thanx for the post but that is not my problem


Re: Whirlpool hash and login dialog - Hyperfire - 06.02.2013

Allright here is the login dialog's code

Code:
case(DIALOG_LOGIN):
{
     new hashpass[129];
     WP_Hash(hashpass, sizeof(hashpass), inputtext);

     if(!response) return Kick(playerid);
     if(response)
     {
          if(!strcmp(hashpass, PlayerInfo[playerid][Password]))
          {
               SendClienrMessage(playerid, 0x00FF00FF,"You have successfully logged in.\nWelcome back!");
               Finished = 1; //A variable that tells request class to start a timer to spawn the player.
          }
          else
          if(strcmp(hashpass, PlayerInfo[playerid][Password]))
          {
               ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login",{FF0000}You have entered an incorrect password!\n{FFFFFF}Please enter your correct password to login","Login","Quit");
               return 1;
          }
     }
}
After that dialog follows other ones and the end return is 0