Login bug - password - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Login bug - password (
/showthread.php?tid=452288)
Login bug - password -
Vectro64 - 20.07.2013
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 ?
Re: Login bug - password -
Vectro64 - 21.07.2013
BUMP, on third page, please help me
AW: Login bug - password -
[AK]Nazgul - 21.07.2013
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.
Re: Login bug - password -
Vectro64 - 21.07.2013
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[])"