03.01.2014, 20:53
The dialog won't show up.. Someone help me please.
pawn Код:
public OnPlayerConnect(playerid)
{
new pName[24],
pName1[24],
dbQuery[255];
GetPlayerName(playerid, pName, sizeof(pName));
format(dbQuery, sizeof(dbQuery), "SELECT `username` FROM `game_accounts` WHERE `username1 = '%s' LIMIT 0,1", pName);
mysql_function_query(dbHandle, dbQuery, true, "AccountLoad", "is", playerid, pName);
return 1;
}
func AccountLoad(playerid, q_acc[])
{
new rows, fields,string[255];
cache_get_data(rows, fields);
if(rows)
{
format(string, sizeof(string), "Welcome back, %s.\nPlease enter your password below.", q_acc);
SPD(playerid, THREAD_DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Cancel");
}
else
{
format(string, sizeof(string), "Welcome, %s.\nPlease enter a password you'll remember below.", q_acc);
SPD(playerid, THREAD_DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Cancel");
}
return 1;
}