Login MySQL
#1

Hello guys, I've the problem in me firts Login Script.

In script write the password and should the login, script logging but don't load the date in me character.

It's the me screenshot with me database:



I need help in the load data me character.

It's a code from me Script

Код:
if(dialogid == D_LOGIN)
	{
		new string[512];
		if(response)
		{
			if(!strlen(inputtext))
			{
                ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_INPUT, "Login", "Hello. Please, enter your password for authorization:", "ОĘ", "Оňěĺнŕ");
                return 1;
            }
			GetPlayerName(playerid, names, sizeof(names));
			format(string, sizeof(string), "SELECT * FROM `gracze` WHERE `name` = '%s' AND `haslo` = '%s'", names, inputtext);
			mysql_query(string);
			mysql_store_result();
			if(mysql_num_rows() == 0)
			{
                SendClientMessage(playerid, 0xFFFFFFFF, "Wrong password! Please retry");
               	ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_INPUT, "Login", "Hello. Please, enter your password for authorization:", "ОĘ", "Оňěĺнŕ");
			}
			else
			{
				format(string, sizeof(string), "SELECT * FROM `gracze` WHERE `name` = '%s'", names);
				SendClientMessage(playerid, 0xFFFFFFFF, "Logging!!");
	 	    }
        }
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)