Help with this one
#1

My problem is

when i put an emty text on the dialog
it will accept and will let the player log in help me
but when i put a wrong password it will not accept


pawn Код:
public OnPlayerLogin(playerid,pasword[])
{
    new attemts = 3;
    if(!strcmp(pasword,pData[playerid][pPass]))
    {
        SendClientMessage(playerid,C_WHITE,"Welcome Back");
        INI_ParseFile(pFiles(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
    }
    else
    {
        attemts -= 1;
        new l_msg[500];
        format(l_msg,sizeof(l_msg),"Welcome Back "CGREEN"%s"CWHITE" This Account is registred \nPlease Enter your password to login \n\n "CRED"[ Error ]: You have entered a invalid password \n you have %d more attemts left",pName(playerid),attemts);
        ShowPlayerDialog(playerid,D_LOGIN,PASSWORD,servername(),l_msg,"login","cancel");
        if(attemts == 0 )
        {
            return BotKick(playerid,"Failure to Login");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help with this one - by Safe - 30.12.2012, 18:22
Re: Help with this one - by RedCrossER - 30.12.2012, 19:29
Re: Help with this one - by Threshold - 30.12.2012, 22:08

Forum Jump:


Users browsing this thread: 1 Guest(s)