SA-MP Forums Archive
MD5 Hash and /login - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MD5 Hash and /login (/showthread.php?tid=80626)



MD5 Hash and /login - Dreftas - 05.06.2009

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


Re: MD5 Hash and /login - Weirdosport - 05.06.2009

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

This only changes the "ignore caps" function.


Re: MD5 Hash and /login - Dreftas - 05.06.2009

Omg, what a foolish mistake I forgot !