ok my problem its when i do wrong password it send me wrong password but when i do correct password its still send me wrong password
Код:
if(dialogid == 1)
{
new string[256];
if(!strlen(inputtext) || !response) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"дшщод","{DB881A}Fun-DeathMatch{00688B} бшелйн дбайн мщшъ\n\r айрк шщен мщшъ жд \n\r дчщ аъ сйсоък лгй мдшщн","айщеш","бйием");
new File:pfile = fopen(file, io_write);
format(string,sizeof(string),"Name:%s\r\nPassword:%s",GetName(playerid),inputtext);
fwrite(pfile, string);
fclose(pfile);
Logged[playerid] = 1;
}
if(dialogid == 2)
{
new pass[40],Line[256];
new File:pfile = fopen(file, io_read);
while (fread(pfile, Line, 256))
{
if(strcmp(Line,"Password",true,strlen(pass)) == 0)
{
new e = strfind(Line, "=", false);
strcat(pass,Line[e+1]);
}
} fclose(pfile);
while(pass[strlen(pass)-1] == '\r' && pass[strlen(pass)-1] == '\n')
{
strdel(pass,strlen(pass)-1,strlen(pass));
}
if(strcmp(pass,inputtext,true) == 0)
{
SendClientMessage(playerid, 0xffffffff,"correct password");
} else {
SendClientMessage(playerid, 0xffffffff,"Wrong Password");
}
}