Mysql
#10

I downloaded lastest plugin and changed script little bit.
Код:
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_tquery(Mysql,string,"Check","i",playerid);
	return 1;
}
forward Check(playerid);
public Check(playerid)
{
	printf("%i",cache_get_row_count());
	if(cache_get_row_count() < 1)
	{
        ShowPlayerDialog(playerid, Dialog_Register, DIALOG_STYLE_PASSWORD, "Register", "Type your password below to register.", "Register", "Quit");
	}
	else
	{
	    ShowPlayerDialog(playerid, Dialog_Login, DIALOG_STYLE_PASSWORD, "Login", "Type your password below to login.", "Login", "Quit");
	}
	return 1;
}
But its same
Reply


Messages In This Thread
Mysql - by MikE1990 - 29.11.2014, 13:42
Re: Mysql - by Chilli9434 - 29.11.2014, 13:46
Re: Mysql - by Galletziz - 29.11.2014, 13:47
Re: Mysql - by Galletziz - 29.11.2014, 13:50
Re: Mysql - by MikE1990 - 29.11.2014, 13:53
Re: Mysql - by MikE1990 - 29.11.2014, 16:33
Re: Mysql - by Galletziz - 29.11.2014, 16:47
Re: Mysql - by MikE1990 - 29.11.2014, 16:59
Re: Mysql - by Raweresh - 29.11.2014, 17:06
Re: Mysql - by MikE1990 - 29.11.2014, 17:27

Forum Jump:


Users browsing this thread: 4 Guest(s)