You Typed An Incorrect Password!
#1

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"...
Reply
#2

Im Not Sure What your useing for accounts but maybe you can try
yini? if your useing it sorry.
Reply
#3

It's fine. Yes I am using y_ini.
Reply
#4

Well let me look into this and try to help somehow
And Did you try "INI_ParseFile"?
Reply
#5

Nope.. I'm a newbie to y_ini. I've only just made this script.
Reply
#6

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
Reply
#7

Yeah, thanks for the help buddy
Still not fixed tho
Reply
#8

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.
Reply
#9

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....
Reply
#10

And The AdminLevel And variables is in a enum?
Reply
#11

Yes.. PlayerInfo is the enum
Reply
#12

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.
Reply
#13

The problem with doing that is... I can login but with any password.
Reply
#14

Quote:
Originally Posted by AntiGen
Посмотреть сообщение
The problem with doing that is... I can login but with any password.
lol i remember that one xD
Reply
#15

Yeah =/ It's really confusing for me.
Reply
#16

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"
Reply
#17

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.
Reply
#18

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)