Y_INI Help ( login bug ) +rep -
RicaNiel - 14.03.2012
Guys good day
i have problem with my login system
i have typed the correct password but still it will say error please i need help
here is the code
pawn Код:
case D_LOGIN:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == pData[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, pData[playerid][pMoney]);
SendClientMessage(playerid,C_BOT,"iBot:"CWHITE" You have successfully login the server");
}
else
{
new name[MAX_PLAYER_NAME],bstring[500];
GetPlayerName(playerid,name,sizeof(name));
format(bstring,500,""CWHITE"User Name: %s \n\n"CRED"Your password is Error please enter the password correctly"CWHITE" \n\nPlease enter your password bellow to Login.",name);
ShowPlayerDialog(playerid,D_LOGIN,PASSWORD,""CRED"Please Enter your password",bstring,"Login","Quit");
}
return 1;
}
}
}
pawn Код:
new INI:Data = INI_Open(UserPath(playerid));
INI_SetTag(Data,"file");
INI_WriteInt(Data,"Password",udb_hash(inputtext));
INI_WriteInt(Data,"Money",0);
INI_WriteInt(Data,"Admin",0);
INI_Close(Data);
pawn Код:
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
Guys i need help thanks +rep
Re: Y_INI Help ( login bug ) +rep -
RicaNiel - 14.03.2012
Guys anyone please?
Re: Y_INI Help ( login bug ) +rep -
ReneG - 14.03.2012
Post where you save your stats. I had a problem like this before.
Re: Y_INI Help ( login bug ) +rep -
RicaNiel - 14.03.2012
pawn Код:
/RicaNiel/PlayerData/%s.ini
here is it
I define it as PATH
please anyone
Re: Y_INI Help ( login bug ) +rep -
StreetGT - 14.03.2012
post your code not your path
Re: Y_INI Help ( login bug ) +rep -
IceCube! - 14.03.2012
How are you loading your passwords?
How are you saving them when they register?
Re: Y_INI Help ( login bug ) +rep -
RicaNiel - 14.03.2012
dffg
Re: Y_INI Help ( login bug ) +rep -
RicaNiel - 14.03.2012
anyone?
Re: Y_INI Help ( login bug ) +rep -
Twisted_Insane - 14.03.2012
Man, stop bumping after every 10 minutes! If I would have done this, I would have been banned...
Re: Y_INI Help ( login bug ) +rep -
ReneG - 14.03.2012
Post the code where you are saving your stats, don't be so ignorant and bump every 10 minutes when we've already told you what to post.