[MySQL] Check Account not quite working
#6

hey it works ok but its showing the Register Dialog for me even though my accunt is registered?

Код:
	new string[128],account[MAX_PLAYER_NAME];
	GetPlayerName(playerid,account,sizeof(account));
	format(string, sizeof(string), "SELECT * FROM `users` WHERE `Name` = '%s' LIMIT 1", account);
	mysql_function_query(mCon, string, true, "CheckAccount", "i",playerid);




forward CheckAccount(playerid,account[]);
public CheckAccount(playerid,account[])
{
	new rows, fields;
	cache_get_data(rows, fields);
	if(rows) // registered
	{
		ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");
	}
	else // Not registered
	{
		ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
	}
	return 1;
}
Reply


Messages In This Thread
[MySQL] Check Account not quite working - by Kontrol - 16.01.2013, 03:00
Re: [MySQL] Check Account not quite working - by Treyvan - 16.01.2013, 03:07
Re: [MySQL] Check Account not quite working - by coakiddo - 16.01.2013, 06:54
Re: [MySQL] Check Account not quite working - by Kontrol - 16.01.2013, 12:33
Re: [MySQL] Check Account not quite working - by coakiddo - 16.01.2013, 14:10
Re: [MySQL] Check Account not quite working - by Kontrol - 16.01.2013, 14:24
Re: [MySQL] Check Account not quite working - by Kontrol - 17.01.2013, 02:04
Re: [MySQL] Check Account not quite working - by Kontrol - 17.01.2013, 18:49

Forum Jump:


Users browsing this thread: 2 Guest(s)