Problem on login - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem on login (
/showthread.php?tid=123440)
Problem on login -
Dj_maryo1993 - 25.01.2010
pawn Код:
if(dialogid == 3)
{
if(response == 1)
{
if(IsPlayerConnected(playerid))
{
if(strlen(inputtext))
{
new idx;
new tmp[256];
new tmppass[64];
tmp = strtok(inputtext, idx);
strmid(tmppass, tmp, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
return 1;
}
else
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Error","Enter Password","Login","Dissconect");
return 1;
}
}
}
if(response == 2)
{
Kick(playerid);
}
}
But when i type space , it loging me on normaly,like i type the good password
How to fix ? or how to detect if the password begins with a space ?
LE :
http://pastebin.com/m132a7e97
The OnPlayerLogin Function
http://pastebin.com/m119d9413
Re: Problem on login -
mansonh - 25.01.2010
May be something wrong with your password checking function OnPlayerLogin(playerid,tmppass);
Re: Problem on login -
Devine - 25.01.2010
Are you encrypting the players password in OnPlayerRegister? If not, comment out Encrypt(tmppass);
Re: Problem on login -
Dj_maryo1993 - 26.01.2010
Yes , i'm encrypting it
Re: Problem on login -
Dj_maryo1993 - 26.01.2010
UP!
Can someone help me ?
Re: Problem on login -
pierhs - 26.01.2010
Can you give me your OnPlayerLogin code?
Re: Problem on login -
Dj_maryo1993 - 26.01.2010
The OnPlayerLogin Function
http://pastebin.com/m119d9413
Re: Problem on login -
Dj_maryo1993 - 27.01.2010
UP !!
Re: Problem on login -
dice7 - 27.01.2010
Do a length check when comparing the passwords, since strcmp will return false if one string is empty.
Re: Problem on login -
Dj_maryo1993 - 28.01.2010
How ?