08.10.2010, 16:04
How can I make that dini saves players password and when he wants to login dini checks his password....
(I don't know if you'll understand what I want to say xD)
I have this code...for login
and every time I try to login it says that it's wrong password.... :S I don't really know what I need to do...
(I don't know if you'll understand what I want to say xD)
I have this code...for login
pawn Код:
if(dialogid == 4)
{
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You need to login in order to play.");
return Kick(playerid);
}
new file[128];
new string[MAX_STRING], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "/users/%s.ini", pname);
new tmp;
tmp = dini_Int(file, "hashPW");
if(udb_hash(inputtext) != tmp)
{
format(string, 256, "Password you typed is wrong for name %s!", pname);
SendClientMessage(playerid, COLOR_RED, string);
new stringlog[128];
format(stringlog, sizeof(stringlog), "Welcome %s, we fount Your account in our database.\nTo login type your password bellow.", pname);
ShowPlayerDialog(playerid, LOGIN_DIALOG,DIALOG_STYLE_INPUT,"[RAZER SYSTEM]: Registered!", stringlog, "Login","Quit");
}
else
{
...............