#1

Ive tried to fix it but i am unable to.
It does not show the login dialog if the player is registered,it always shows the register dialog



Код:
    new query[250],rows,fields,str1[250];
    mysql_format(mysql, query, sizeof(query), "SELECT `Password`, `Account_ID` FROM `players` WHERE `Name` = '%s' LIMIT 1", GetName(playerid));
    mysql_tquery(mysql, query);

    cache_get_data(rows, fields, mysql);
    if(rows)
    {
        cache_get_field_content(0, "Password", PlayerInfo[playerid][pPass], mysql, 30);
        PlayerInfo[playerid][Accountid] = cache_get_field_content_int(0, "Account_ID");
    	format(str1, 150, "{FFFFFF}This name is registered,enter a password for this account:\n");
       	ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""COL_GREEN"UGF - Login", str1, "Login", "");
    }
    else
    {
        format(str1, 150, "\n{FFFFFF}Welcome To FreeRoam Server\n\n{00FF00}Account Name:{FFFFFF} %s\n\nEnter A Password To Register This Account", GetName(playerid));
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", str1, "Register", "");
        PlayerInfo[playerid][New] = 1;
    }
Reply
#2

Hi bro, looks like you're treating mysql_tquery as non threaded. You should use mysql_query or put pass the threaded query to a callback.
Reply
#3

Quote:
Originally Posted by Richie©
Посмотреть сообщение
Hi bro, looks like you're treating mysql_tquery as non threaded. You should use mysql_query or put pass the threaded query to a callback.
Oh,thanks,its worked
I thought i can use mysql_tquery like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)