10.11.2014, 09:17
Hello,
i have a problem with registering/logging system.
the problem is when i register i can't login with the password that i created, but every password works ( i can login with every password exept the password that i created )
Example: i register password "123123", and i try to login with "123123" its won't work, but if i tried to login with "asdrqwewq" it works.
i hope i explained good, here is a code that can help:
i have a problem with registering/logging system.
the problem is when i register i can't login with the password that i created, but every password works ( i can login with every password exept the password that i created )
Example: i register password "123123", and i try to login with "123123" its won't work, but if i tried to login with "asdrqwewq" it works.
i hope i explained good, here is a code that can help:
pawn Код:
else if(dialogid == 2) // Login
{
if(response)
{
new file[64], password[256], IP[16], password2[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
WP_Hash(password2, sizeof(password2), inputtext);
format(password, sizeof(password), "%s", dini_Get(file, "Password"));
if(strcmp(password2, password, false) == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
ShowDialog(playerid, 2);
return 1;
}