PDA

View Full Version : Login System bugged


jtemple042996
08/08/2012, 06:19 PM
I have the following line in my script to log in:
phash = hash(inputtext);
if(phash == dini_Int(file,"password"))
{
alevel[playerid] = dini_Int(file,"alevel");
amonth[playerid] = dini_Int(file,"amonth");
aday[playerid] = dini_Int(file,"aday");
ayear[playerid] = dini_Int(file,"ayear");
gender[playerid] = dini_Int(file,"gender");
sscanf(whenmade[playerid],dini_Get(file,"whenmade"));
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Password incorrect!");
}

Even when you put in the correct password, it tells you your password is wrong.

RustySnowman x
08/08/2012, 08:00 PM
Just delete the login syetam out of your script and get a fs

[DOG]irinel1996
08/08/2012, 08:16 PM
Give a try:

if(strcmp(hash(inputtext),dini_Int(file,"password"),false))
{
alevel[playerid] = dini_Int(file,"alevel");
amonth[playerid] = dini_Int(file,"amonth");
aday[playerid] = dini_Int(file,"aday");
ayear[playerid] = dini_Int(file,"ayear");
gender[playerid] = dini_Int(file,"gender");
sscanf(whenmade[playerid],dini_Get(file,"whenmade"));
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Password incorrect!");
}

jtemple042996
24/08/2012, 11:46 PM
Fixed