[Help] Password saving
#8

pawn Код:
if(dialogid == DIALOG_LOGIN)
{
 if(!response) Kick(playerid);
 if(response) {
 if(!strcmp(udb_hash(inputtext), PlayerInfo[playerid][pLozinka], false))
 {
  //Login functions.
 }
 else
 {
  //Wrong pass
 }
 }
}
return 1;
}
Use strcmp to see if two strings are equal or not, I haven't used udb_hash so I don't know about that. Also 'LoadUser_%s' could create problems. I'd rather choose creating a function like 'LoadUser_Data' to load the user data from the file and execute it in 'INI_ParseFile'. Also, use a better hash like Whirlpool hash or SHA1. Those are really nice.
Reply


Messages In This Thread
[Help] Password saving - by bugi - 11.05.2013, 20:31
Re: [Help] Password saving - by bugi - 11.05.2013, 21:20
Re: [Help] Password saving - by bugi - 11.05.2013, 21:49
Re: [Help] Password saving - by bugi - 12.05.2013, 10:55
Re: [Help] Password saving - by Cjgogo - 12.05.2013, 11:02
Re: [Help] Password saving - by RajatPawar - 12.05.2013, 11:06
Re: [Help] Password saving - by bugi - 12.05.2013, 11:09
Re: [Help] Password saving - by Lordzy - 12.05.2013, 11:19
Re: [Help] Password saving - by bugi - 12.05.2013, 11:25
Re: [Help] Password saving - by bugi - 12.05.2013, 11:29

Forum Jump:


Users browsing this thread: 2 Guest(s)