INI Account Saving.
#10

++ EDIT: check Andy's tut (https://sampforum.blast.hk/showthread.php?tid=597639) and mine too (https://sampforum.blast.hk/showthread.php?tid=602819)

At the top most of your script, right under the includes, put the native given below as there is no Whirlpool include but only a plugin.
PHP код:
native WP_Hash(buffer[], len, const str[]); 
Put this right under the register dialog
PHP код:
WP_Hash(PlayerInfo[playerid][Key], 129inputtext); // hashing it!
new INI:file INI_Open(UserPath(playerid)); //opening the file
.....
INI_WriteString(file"Key"PlayerInfo[playerid][Key]); //write the hashed string
.....
INI_Close(file); // close the file.
..... // these naughty kids (dots) means etc stuff 
put this right under the login dialog
PHP код:
                new    hashpass[129]; // new string variable!
                
WP_Hash(hashpasssizeof(hashpass), inputtext); //hashing the inputted text
                
if(!strcmp(hashpassPlayerInfo[playerid][Password])) // if the password matches
                
{
                ............... 
// bla bla bla your login system stuff
                
}
                else
                {
                ..............
// bla bla if the password is wrong
                

Reply


Messages In This Thread
INI Account Saving. - by iKevin - 22.04.2016, 19:04
Re: INI Account Saving. - by Vince - 22.04.2016, 19:33
Re: INI Account Saving. - by iKevin - 22.04.2016, 19:35
Re: INI Account Saving. - by iKevin - 22.04.2016, 20:06
Re: INI Account Saving. - by Logic_ - 23.04.2016, 06:36
Re: INI Account Saving. - by GhostHacker - 23.04.2016, 06:42
Re: INI Account Saving. - by iKevin - 23.04.2016, 06:54
Re: INI Account Saving. - by itsCody - 23.04.2016, 06:56
Re: INI Account Saving. - by oMa37 - 23.04.2016, 07:00
Re: INI Account Saving. - by Logic_ - 23.04.2016, 08:26

Forum Jump:


Users browsing this thread: 1 Guest(s)