Whirlpool hash and login dialog
#1

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.
Reply
#2

No code no help mate
Reply
#3

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

Reply
#4

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

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
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)