29.11.2014, 13:42
I have problem with newest mysql when i connect to server dialog doesnt appear.
Код:
public OnPlayerConnect(playerid) { new string[255]; GetPlayerName(playerid,PlayerInfo[playerid][Username],128); format(string,255,"SELECT * FROM `accounts` WHERE Username = '%s'",PlayerInfo[playerid][Username]); mysql_function_query(Mysql,string,true,"Check","i",playerid); return 1; } forward Check(playerid); public Check(playerid) { new rows,fields; cache_get_data(rows,fields); if(rows) { ShowPlayerDialog(playerid, Dialog_Login, DIALOG_STYLE_PASSWORD, "Login", "Type your password below to login.", "Login", "Quit"); } else { ShowPlayerDialog(playerid, Dialog_Register, DIALOG_STYLE_PASSWORD, "Register", "Type your password below to register.", "Register", "Quit"); } return 1; }