07.05.2015, 13:33
Hello!
After register you have to put in your password in the array: PlayerInfo[playerid][pPassword]
Please change the length of pPassword in the format in the following code:
So. Does it work now? If not, please explain me what is wrong.
After register you have to put in your password in the array: PlayerInfo[playerid][pPassword]
Please change the length of pPassword in the format in the following code:
PHP Code:
case D_REGISTER:
{
if(response)
{
if(strlen(inputtext) > 18)
{
SendInfoMessage(playerid, 0, "8", "Password must be a maximum of 18 characters.");
ShowRegisterDialog(playerid,D_REGISTER);
return 1;
}
if(IsNull(inputtext))
{
ShowRegisterDialog(playerid,D_LOGIN);
return 1;
}
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(UserPath(playerid));
INI_WriteString(file,"Password",hashpass);
INI_Close(file);
format(PlayerInfo[playerid][pPassword],129,hashpass);
Dialog(playerid,D_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF6E}Log in","{F0F0F0}For security reasons, confirm your password:","Confirm","Cancel");
}
else
{
Kick(playerid);
}
return 1;
}

