12.07.2010, 16:38
I have a problem where I type in a password and it says it incorrect.
pawn Code:
new pass[50];
format(pass,50,"%s",strlen(inputtext));
if(!strcmp(String2,pass,true) && strlen(pass))
{
Init_CharData(playerid);
format(stringEX,128,"Welcome back %s!",charsinfo[playerid][user_name]);
SendClientMessage(playerid,COLOR_LIGHTYELLOW,stringEX);
playerinfo[playerid][login]=true;
playerinfo[playerid][updatereduce]=30;
getdate(yearEX,monthEX,dayEX);
gettime(hourEX,minEX,secEX);
format(queryEX, 256, "UPDATE `main_users` SET `timestamp`='%d/%d/%d - %d:%d:%d' WHERE `id`='%d' LIMIT 1;",yearEX,monthEX,dayEX,hourEX,minEX,secEX,mcinfo[playerid][mcid]);
mysql_query(queryEX);
freeze(playerid,0);
} else
{
playerinfo[playerid][Try]++;
format(stringEX,128,"Wrong password (%d/3)!",playerinfo[playerid][Try]);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", stringEX, "Login", "Cancel");
if(playerinfo[playerid][Try]==3)
{
SendClientMessage(playerid,COLOR_RED,"You have tried three times. You have been kicked from the server.");
Kick(playerid);
}
}