24.03.2015, 08:39
How do I stop the passwords from hashing?
Like, how can I see the actual password in the scriptfiles folder when I click on the players name.
In other words, is there something else I can replace the udb_hash with to make it not hash(encrypt) out the players password?
Here's some code:
Like, how can I see the actual password in the scriptfiles folder when I click on the players name.
In other words, is there something else I can replace the udb_hash with to make it not hash(encrypt) out the players password?
Here's some code:
Код:
stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }
Код:
if(dialogid == 20) { if(!response) return Kick (playerid); if(response) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { new string[128]; INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); format(string, sizeof(string), "System: Welcome back to Gangwar Deathmatch, %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE,string); LoggedIn[playerid] = 1; } else { ShowPlayerDialog(playerid,20,DIALOG_STYLE_PASSWORD,"Login",""BR"You have entered an Incorrect Password.\n"LB"Please try again.","Login","Exit"); } return 1; }
Код:
INI_WriteInt(File,"Password", PlayerInfo[playerid][pPass] = udb_hash(inputparam));