help | mysql
#3

Okay it worked.
But now there is another problem.
A player connects, even if he wrote the wrong password it than the entry.
Here's the code:

pawn Код:
if(dialogid == LogDialog)
    {
        if(!response) return SendClientMessage(playerid,c_red,"...בחרת לא להתחבר ולכן קיבלת קיק"),Kick(playerid),0;
        if(!strlen(inputtext))
        {
            format(String,256,"{ffffff}!\"%s\" שלום\n{%s}Proffesional DeathMeath ברוך הבא לקהילת\nעל מנת להמשיך לשחק\n:הקש את הסיסמה שאיתה נרשמת",GetName(playerid),GetHColor(c_yellow));
            return ShowPlayerDialog(playerid,LogDialog,DIALOG_STYLE_INPUT,"\t\t\t\t{ffffff}התחברות לשרת",String,"התחבר","");
        }
        format(String,256,"SELECT Password FROM Users WHERE Nick='%s' AND Password='%s'",GetName(playerid),inputtext);
        mysql_query(String);
        if(mysql_num_rows() == 1)
        {
            SendClientMessage(playerid,c_green,"!התחברת בהצלחה");
            Logged[playerid] = true;
        }
        else
        {
            LoginsErrors[playerid]++;
            format(String,256,"(%i/3) !סיסמה שגויה",LoginsErrors[playerid]);
            SendClientMessage(playerid,c_red,String);
            if(LoginsErrors[playerid] == 3) return Kick(playerid);
            format(String,256,"{ffffff}!\"%s\" שלום\n{%s}Proffesional DeathMeath ברוך הבא לקהילת\nעל מנת להמשיך לשחק\n:הקש את הסיסמה שאיתה נרשמת",GetName(playerid),GetHColor(c_yellow));
            ShowPlayerDialog(playerid,LogDialog,DIALOG_STYLE_INPUT,"\t\t\t\t{ffffff}התחברות לשרת",String,"התחבר","");
        }
    }
What's the problem here?
Thanks in advance for helpers!
Reply


Messages In This Thread
help | mysql - by EviLpRo - 12.06.2011, 18:21
Re: help | mysql - by whitedragon - 12.06.2011, 18:30
Re: help | mysql - by EviLpRo - 12.06.2011, 18:53
Re: help | mysql - by whitedragon - 12.06.2011, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)