MD5 Hash and /login
#1

pawn Код:
samp_mysql_get_field("pass_hash", str);
pawn Код:
if(strcmp(MD5_Hash(params),str,false) == 0)
{
// here goes code if player writes wrong password
//...
pawn Код:
else if(strcmp(MD5_Hash(params),str,true) == 0)
{
// here goes code if player writes correct password
// Player get last adminlvl/lvl/exp/left exp/money/bank etc.
// and player integer pInfo[playerid][Logged] == 1
When I write incorrect password - script works as it should
When I write correct password - script still says that password is wrong
If I write not password, but /login [passwordHashHere], then script don't do anything. It doesn't write information that password correct/incorrect, just nothing..

I think problem is somewhere with strcmp(), maybe someone have any suggests ?
Full dcmd_login command > http://pastebin.com/m2c855097
Reply
#2

The only difference I can see between the two if's is the true/false.

This only changes the "ignore caps" function.
Reply
#3

Omg, what a foolish mistake I forgot !
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)