30.03.2015, 02:07
+Rep I forgot something, already analyzed but do not know..
Save password....
.txt file: Passw = 0
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);
}
pawn Код:
DOF2_SetInt(fFile, "Passw", SpielerInfo[playerid][Pass]);