28.04.2012, 13:55
Guys what's wrong with this one
always show incorrect password while its correct i type it correctly
i need help
i use two experiments but still incorrect i wonder what part am i get wrong
and also if i use udb_hash
also incorrect password i typed it correctly
always show incorrect password while its correct i type it correctly
i need help
i use two experiments but still incorrect i wonder what part am i get wrong
pawn Код:
ublic OnPlayerLogin(playerid,password[])
{
new string[128];
if(strcmp(pData[playerid][pPassword],password,true,0))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else
{
logattempts[playerid] += 1;
switch(logattempts[playerid])
{
case 1: string = "Three more Login Attempts";
case 2: string = "Two more Login Attempts";
case 3: string = "One more Login Attempts";
case 4:
{
SendClientMessage(playerid,C_WHITE,"You have been kicked because of ("CORANGE" Failure to Correct password ( 3x )"CWHITE" )");
Kick(playerid);
}
}
new ldialog[500];
format(ldialog,sizeof(ldialog),""CWHITE"Welcome back to RicaNiel Role-Play\n\nUser: "CORANGE"%s"CWHITE"\n\nPlease Enter your password to login\n\n [ "CRED"%s"CWHITE" ]",RemoveUnderScore(playerid),string);
SPD(playerid,D_LOGIN,PASSWORD,""CSERVER"RicaNiel Role-Play",ldialog,"Proceed","Cancel");
}
return 1;
}
also incorrect password i typed it correctly
pawn Код:
*new string[128];
if(udb_hash(inputtext) == pData[playerid][pPassword])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else
{
logattempts[playerid] += 1;
switch(logattempts[playerid])
{
case 1: string = "Three more Login Attempts";
case 2: string = "Two more Login Attempts";
case 3: string = "One more Login Attempts";
case 4:
{
SendClientMessage(playerid,C_WHITE,"You have been kicked because of ("CORANGE" Failure to Correct password ( 3x )"CWHITE" )");
Kick(playerid);
}
}
new ldialog[500];
format(ldialog,sizeof(ldialog),""CWHITE"Welcome back to RicaNiel Role-Play\n\nUser: "CORANGE"%s"CWHITE"\n\nPlease Enter your password to login\n\n [ "CRED"%s"CWHITE" ]",RemoveUnderScore(playerid),string);
SPD(playerid,D_LOGIN,PASSWORD,""CSERVER"RicaNiel Role-Play",ldialog,"Proceed","Cancel");
}