16.08.2011, 10:02
when player input what ever he logged in, any inputtext is correct :S
here is code:
i have no errors but when any player type something as password it logged :S
here is code:
pawn Код:
if(dialogid == DIALOG_LOGIN)
{
if(!response) Kick(playerid);
new iStr[128],gTries;
if(gTries == 3)
{
new pName[30];
GetPlayerName(playerid,pName,sizeof(pName));
format(iStr,sizeof(iStr),"%s is kicked.",pName);
SendClientMessageToAll(red,iStr);
return Kick(playerid);
}
if(!strlen(inputtext))
{
gTries++;
format(iStr,sizeof(iStr),"Please input your password. Tries: %i/3",gTries);
return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Prijava",iStr,"Login","Back");
}
if(strcmp(pInfo[playerid][Pass], inputtext, true) == 0)
{
pLogged[playerid] = 1;
LoginAcc(playerid);
}
else
{
format(iStr,sizeof(iStr),"Wrong password. Tries: %i/3",gTries);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Prijava",iStr,"Login","Back");
gTries++;
return 1;
}
return 1;
}