06.12.2010, 10:32
Hi guys I make a login register system It was working perfect When I set PInfo,pass as a int but now I change it to string
and its not getting right str and saving "Wrong pass"
and its not getting right str and saving "Wrong pass"
pawn Код:
enum pInfo
{
Password[255],
pAdminLevel,
pScore,
pCash,
pLPrice,
};
pawn Код:
if(dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if(!strlen(inputtext))return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Your registered!","Welcome back :P\nPlease sign-in below:","Login","Cancel");
PlayerInfo[playerid][Password] = dini_Get(file,"Password");
if(udb_hash(inputtext) != PlayerInfo[playerid][Password])
{
SendClientMessage(playerid,RED,"Sorry Wrong Password!");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Your registered!","Welcome back :P\nPlease sign-in below:","Login","Cancel");
}
else
{
OnLogin(playerid, inputtext);
}
}
return 1;
}