Login problem
#5

Try this.
pawn Код:
stock LogMeIn(playerid,const password[])
{
    new EscapedText[60], Query[80], pName[24];
    GetPlayerName(playerid,pName,sizeof(pName));
    mysql_real_escape_string(password, EscapedText);
    format(Query,sizeof(Query),"SELECT * FROM `users` WHERE `name` = '%s' AND `pass` = '%s'",pName,EscapedText);
    mysql_query(Query);
    mysql_store_result();
    if(!strlen(password))
    {
        ShowPlayerDialog(playerid, Valepass, DIALOG_STYLE_PASSWORD, "Wrong password!", "Wrong password!", "Login", "Leave");
        return 0;
    }
    if(mysql_num_rows() != 0)
    {
        SendClientMessage(playerid,yello2,"U've just log'd in!");
        LoadStats(playerid);
    }
    else
    {
        ShowPlayerDialog(playerid, Valepass, DIALOG_STYLE_PASSWORD, "Wrong password!", "Wrong password!", "Login", "Leave");
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
Login problem - by tsonn1 - 30.11.2012, 19:31
Re: Login problem - by GiamPy. - 30.11.2012, 19:51
Re: Login problem - by tsonn1 - 01.12.2012, 06:45
Re: Login problem - by tsonn1 - 01.12.2012, 12:26
AW: Login problem - by Skimmer - 01.12.2012, 12:47
Re: Login problem - by tsonn1 - 01.12.2012, 14:44
Re: Login problem - by tsonn1 - 01.12.2012, 19:23
Re: Login problem - by tsonn1 - 02.12.2012, 07:41
Re: Login problem - by tsonn1 - 02.12.2012, 12:02
Re: Login problem - by tsonn1 - 02.12.2012, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)