SA-MP Forums Archive
Password Confirmation - 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)
+--- Thread: Password Confirmation (/showthread.php?tid=603415)



Password Confirmation - eikzdej - 23.03.2016

How can i add password confirmation upon registration? Thanks!

Quote:

if(dialogid == DIALOG_REGISTER)
{
new string_reg[128], string_reg_name[128], playername[MAX_PLAYER_NAME];

GetPlayerName(playerid, playername, sizeof(playername));

format(string_reg, sizeof(string_reg), "Register - {FFD700}%s", playername);
format(string_reg_name, sizeof(string_reg_name), "{FF0000}Password must be atleast 10 characters.\n{FFFFFF}Welcome to Gravity Gaming Roleplay, %s!\n\n{FFFFFF}Please fill up again your desired password.", playername);

if(!response) return Kick(playerid);
if(strlen(inputtext) < 10)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, string_reg, string_reg_name, "Register", "Quit");
return 0;
}

WP_Hash(Player[playerid][Password], 129, inputtext);

ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Select", "Quit");
}




Re: Password Confirmation - BiosMarcel - 23.03.2016

Well after u have aaked for his password just ask him again and then compare the variables, pretty easy


Re: Password Confirmation - saffierr - 23.03.2016

Just show the player the Login dialog afterwards.