Login script allows any password
#1

My register code:

Код:
case DIALOG_REGISTER:
        {
            if (!response) return 1;
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FF21E1}Register","{F5ED05}Type your password below to register an account.\n{FA1111}That password is invalid","Register","Cancel");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteString(File,"Password",inputtext);
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Vip",0);
                INI_WriteInt(File,"Muted",0);
                INI_WriteInt(File,"Ban",0);
                INI_WriteInt(File,"Score",0);
                INI_WriteInt(File,"Pet",0);
                INI_Close(File);
                SendClientMessage(playerid, COLOR_GREEN, "Your stats will now be saved! You have been logged in automatically.");
            }
        }
Login code:

Код:
case DIALOG_LOGIN:
        {
            if (!response) return Kick (playerid);
            if(response) 
            {
                if(strcmp(inputtext, PlayerInfo[playerid][pPass], false))
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SendClientMessage(playerid, COLOR_GREEN, "You have been logged in.");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FF21E1}Login","{F5ED05}Type your password below to login.\n{FA1111}Incorrect password!","Login","Quit server");
                }
                return 1;
            }
        }
When i register with the password 666 and i login with the password 777 it allows me to login
Reply


Messages In This Thread
Login script allows any password - by Sellize - 29.07.2013, 15:17
Re: Login script allows any password - by dEcooR - 29.07.2013, 15:18
AW: Login script allows any password - by Skimmer - 29.07.2013, 15:19
Re: Login script allows any password - by Scenario - 29.07.2013, 15:20
Re: Login script allows any password - by Sellize - 29.07.2013, 15:21
Re: Login script allows any password - by ryansheilds - 29.07.2013, 19:03
Re: Login script allows any password - by Sellize - 29.07.2013, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)