Login bug - password
#1

Hello ...

Before I write my prob I must say that maybe I'll make some mistakes in gramatic so please do not mind

__________________________________________________ __________________________________________________

My reg/log system is in MySQL by BlueG(thanks). OnPlayerConnect I made with mysql_function_query that from username it call public CheckPlayer(playerid) and in that public I'm checking does player account is registered or not.
If it's registered I giving them dialog for login, or if isn't dialog for register. Because I don't have problems with registering I'll now say you something more about login. When player input password and press "Login" "I'm" going on OnDialogResponse, and there code for DIALOG_LOGIN is:

Код:
        case DIALOG_LOGIN:
        {
            if (!response)
			{
			Kick (playerid);
			}
            if( response )
            {       
					mysql_format(connectionHandle, Query, "SELECT * FROM `users` WHERE `Ime i prezime` = '%e' AND Password = '%e'", GetName(playerid), inputtext);
					new result = mysql_function_query(connectionHandle, Query, false, "LoginPlayer", "ds", playerid, inputtext);
					
					if(result == 0)
                    {
                    SendClientMessage(playerid, -1, "{039EFF}MG:RP || {FFFFFF}Password koji ste unijeli nije tacan, kickovani ste!");
                    Kick(playerid);
					}
				}
			 	}
But now if I enter true or false password I'll be logged in. Can you please help me ?

If you need code of LoginPlayer function to help me I'll give you and that code. Or just say me where I need edit this ?
Reply
#2

BUMP, on third page, please help me
Reply
#3

Are you really being logged in or does the server just forward you to the class-selection without loading any userdata? You can simply fix this by placing these dialoges under OnPlayerRequestClass. I had the same problem when I placed them under OnPlayerConnect.
Reply
#4

I being logged in but if I wrong server crash me ( one good thing in prob hehe ). My dialogs are in "public LoginPlayer(playerid, password[])"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)