fixes2 crashing MySQL
#3

Sure, here's the callback:
Код:
inline SQLOnAccountCheck()
{
	if(playerid != INVALID_PLAYER_ID)
	{
	    new rows, fields;
	    cache_get_data(rows, fields, SQL);
	    if(rows)
	    {
			pData[playerid][userid] = cache_get_row_int(0, 0, SQL);
			cache_get_row(0, 2, pData[playerid][password], SQL, 129);
			cache_get_row(0, 3, pData[playerid][salt], SQL, 257);

			LoginAttempts[playerid] = 0;
			new loginstring[70];
			format(loginstring, sizeof(loginstring), "Welcome %s\n\nPlease enter your password.\n\n", GetNameEx(playerid));
			Dialog_Show(playerid, d_Login, DIALOG_STYLE_PASSWORD, "Login", loginstring, "Login", "");
			LoginTimer[playerid] = SetTimerEx("OnTimedKick", 70000, 0, "d", playerid);
		}
	}
}
mysql_pquery_inline(SQL, query, using inline SQLOnAccountCheck, "");
Код:
enum e_UserData
{
	userid[8],
	password[129],
	salt[257]
};

new pData[MAX_PLAYERS][e_UserData];
Reply


Messages In This Thread
fixes2 crashing MySQL - by Finn707 - 12.05.2015, 13:01
Re: fixes2 crashing MySQL - by AnnaSB - 12.05.2015, 16:53
Re: fixes2 crashing MySQL - by Finn707 - 12.05.2015, 19:46
Re: fixes2 crashing MySQL - by awsomedude - 12.05.2015, 19:51
Re: fixes2 crashing MySQL - by Finn707 - 12.05.2015, 19:59
Re: fixes2 crashing MySQL - by Konstantinos - 12.05.2015, 20:08
Re: fixes2 crashing MySQL - by Finn707 - 12.05.2015, 20:19
Re: fixes2 crashing MySQL - by AnnaSB - 13.05.2015, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)