You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Login Code
Code:
case PLAYER_LOGIN:
{
if(response)
{
new Password2[128];
GetPVarString(playerid, "PASSWORD", Password2, sizeof Password2);
if(strcmp(inputtext,Password2,false))
{
LoadPlayerAccount(playerid);
SendClientMessage(playerid, 0xFF0000FF, "You Have Been Logged In!");
IsPlayerLogged[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Typed An Incorrect Password!");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{FF0000}Wrong Password!\n","{F2F2F2}You Typed An Incorrect Password\n", "Login", "Leave");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You Clicked Leave");
Kick(playerid);
}
}
Every time I try login with my password I keep Getting "You Typed An Incorrect Password"...
Re: You Typed An Incorrect Password! -
[OC]Zero - 08.04.2011
Im Not Sure What your useing for accounts but maybe you can try
yini? if your useing it sorry.
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
It's fine. Yes I am using y_ini.
Re: You Typed An Incorrect Password! -
[OC]Zero - 08.04.2011
Well let me look into this and try to help somehow
And Did you try "INI_ParseFile"?
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Nope.. I'm a newbie to y_ini. I've only just made this script.
Re: You Typed An Incorrect Password! -
jonnyboy - 08.04.2011
i don't know the y_ini thingy but i think these following:
* Something is wrong typed
* You missed a code
i don't know it so i don't know if im helping at all :O sorry, Gen
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Yeah, thanks for the help buddy
Still not fixed tho
Re: You Typed An Incorrect Password! -
[OC]Zero - 08.04.2011
https://sampforum.blast.hk/showthread.php?pid=1138420#pid1138420
There is someinfo on "INI_ParseFile" There Just go down a bit
Read up on it some then make a test script or something.
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Inside LoadPlayerAccount:
Code:
INI_ParseFile(PlayerFile, "LoadUser", false, true, playerid, true, false);
Then after in "LoadUser" I have all of my player variables. Such as AdminLevel....
Re: You Typed An Incorrect Password! -
[OC]Zero - 08.04.2011
And The AdminLevel And variables is in a enum?
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Yes.. PlayerInfo is the enum
Re: You Typed An Incorrect Password! -
Vince - 08.04.2011
pawn Код:
if(strcmp(inputtext,Password2,false))
{
LoadPlayerAccount(playerid);
SendClientMessage(playerid, 0xFF0000FF, "You Have Been Logged In!");
strcmp
returns 0 on success. So doing
if(!strcmp(... will most likely fix your problem.
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
The problem with doing that is... I can login but with any password.
Re: You Typed An Incorrect Password! -
jonnyboy - 08.04.2011
Quote:
Originally Posted by AntiGen
The problem with doing that is... I can login but with any password.
|
lol i remember that one xD
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Yeah =/ It's really confusing for me.
Re: You Typed An Incorrect Password! -
jonnyboy - 08.04.2011
Quote:
Originally Posted by AntiGen
Yeah =/ It's really confusing for me.
|
don't worry
u always fix everything somehow xD "and sometimes fucks them up instead :3"
Re: You Typed An Incorrect Password! -
AntiGen - 08.04.2011
Quote:
Originally Posted by jonnyboy
don't worry u always fix everything somehow xD "and sometimes fucks them up instead :3"
|
Yeah, I hope so if somebody can reply to help me.
Re: You Typed An Incorrect Password! -
chrism11 - 09.04.2011
nvm o.o, i suggest actually saving it to a file, and if you want to , but dont know how, pm me and ill help u