Not saving password - 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: Not saving password (
/showthread.php?tid=569362)
Not saving password -
StarPeens - 30.03.2015
+Rep I forgot something, already analyzed but do not know..
pawn Код:
else if(dialogid == DIALOG_ID_REGISTER){
if(response){
if(strlen(inputtext) < 3){
ShowPlayerDialog(playerid,DIALOG_ID_REGISTER,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to [DayZ]","{FFFFFF}The specified password was too short,\nyour password requires at least 3 characters","Register","Exit");
return 1;
}else{
ClearChat(playerid);
SpielerInfo[playerid][Pass] = strval(inputtext); // PASSWORD FUNCTION
pawn Код:
else if(dialogid == DIALOG_ID_LOGIN){
if(response)
{
if(strlen(inputtext) == 0){
ShowPlayerDialog(playerid,DIALOG_ID_LOGIN,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to DayZ 0.12 Beta","{FFFFFF}Incorrect password! Please enter your correct password!:","Login","Exit");
return 1;
}else{
if(strval(inputtext) == SpielerInfo[playerid][Pass]) {
...
}else{
SpielerInfo[playerid][pFalschesPasswort]++;
ShowPlayerDialog(playerid,DIALOG_ID_LOGIN,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to DayZ 0.12 Beta ","{FFFFFF}Incorrect password! Please enter your correct password!:","Login","Exit");
if(SpielerInfo[playerid][pFalschesPasswort] == 4)Kick(playerid);
}
Save password....
pawn Код:
DOF2_SetInt(fFile, "Passw", SpielerInfo[playerid][Pass]);
.txt file: Passw = 0
Re: Not saving password -
Threshold - 30.03.2015
TIP:
Hash your passwords.
Use y_ini.
Whirlpool plugin (For hashing passwords):
https://sampforum.blast.hk/showthread.php?tid=65290
Y_INI:
https://sampforum.blast.hk/showthread.php?tid=175565
Re: Not saving password -
ATGOggy - 30.03.2015
Are you sure that you used INI_Close() after saving?
Re: Not saving password -
Runn3R - 30.03.2015
Remove strval and use whirlpool or SHA512
Re: Not saving password -
StarPeens - 30.03.2015
Quote:
Originally Posted by Runn3R
Remove strval and use whirlpool or SHA512
|
How? tip please?
Re: Not saving password -
StarPeens - 31.03.2015
bump, i not fixed it yet.. REP