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;
}
|
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.
|