help | Automatically connecting to the IP
#6

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Use mysql_free_result

pawn Код:
public OnPlayerConnect(playerid)
{
    Player[playerid][Logged] = false;
    format(String,256,"SELECT * FROM `Users` WHERE `Nick`='%s'",GetName(playerid));
    mysql_query(String);
    mysql_store_result();
    if(!mysql_num_rows())
    {
        mysql_free_result();
        ShowPlayerDialog(playerid,Reg_Dialog,DIALOG_STYLE_INPUT,"QuicK DeathMatch - Register","!Quick DeathMatch ברוכים הבאים לקהילת\n.לפי הרישומים שלנו, המשתמש שלך אינו קיים\nעל מנת להנות ולשחק בשרתינו\n:הקש את סיסמת ההתחברות שתשמש אותך בכניסה לשרת","הרשמה","");
    }
    else
    {
        mysql_free_result();
        format(String,256,"SELECT * FROM `Users` WHERE `Nick`='%s' AND `IPLogged'=true AND `IP`='%s'",GetName(playerid),GetIP(playerid));
        mysql_query(String);
        mysql_store_result();
        if(mysql_num_rows())
        {
            SendClientMessage(playerid,c_green,".שלך IPברוך השב ! חוברת אוטומטית לפי כתובת ה");
            Player[playerid][Logged] = true;
            mysql_free_result();
            for(new i = 0; i < GetMaxPlayers(); i++)
            {
                format(String,256,"SELECT * FROM `Users` WHERE `Nick`='%s' AND `SeeLogins`=true",GetName(i));
                mysql_query(String);
                mysql_store_result();
                if(mysql_num_rows() && i != playerid)
                {
                    format(String,256,"{99FFCC}*** {3399CC}%s {99FFCC}Has join to server. (#%03i)",GetName(playerid),playerid);
                    SendClientMessage(i,c_grey,String);
                }
                mysql_free_result();
            }
        }
        else
        {
            mysql_free_result();
            Player[playerid][Errors] = 0;
            ShowPlayerDialog(playerid,Log_Dialog,DIALOG_STYLE_INPUT,"QuicK DeathMatch - Login","!Quick DeathMatch ברוכים הבאים לקהילת\n.לפי הרישומים שלנו, המשתמש שלך כבר קיים\nעל מנת להנות ולשחק בשרתינו\n:הקש את הסיסמה שאיתה נרשמת לשרת","התחבר","");
        }
    }
    return true;
}
not working.
please help /:
Reply


Messages In This Thread
help | Automatically connecting to the IP - by EviLpRo - 03.07.2011, 11:16
Re: help | Automatically connecting to the IP - by Jochemd - 04.07.2011, 09:21
Re: help | Automatically connecting to the IP - by EviLpRo - 04.07.2011, 09:45
Re: help | Automatically connecting to the IP - by Jochemd - 04.07.2011, 10:26
Re: help | Automatically connecting to the IP - by MadeMan - 04.07.2011, 10:29
Re: help | Automatically connecting to the IP - by EviLpRo - 04.07.2011, 12:10
Re: help | Automatically connecting to the IP - by MadeMan - 04.07.2011, 12:54
Re: help | Automatically connecting to the IP - by EviLpRo - 04.07.2011, 17:01
Re: help | Automatically connecting to the IP - by [L3th4l] - 04.07.2011, 17:22
Re: help | Automatically connecting to the IP - by EviLpRo - 04.07.2011, 17:58

Forum Jump:


Users browsing this thread: 3 Guest(s)