Password issue Y_ini register system
#1

https://sampforum.blast.hk/showthread.php?tid=586090
here's the register system , when i login to my account i write anything and it logs me in , how can i fix this ?
Reply
#2

Код HTML:
public loadaccount_user
Код HTML:
INI_SetTag(File,"Player's Data");
The loadaccount_%s it's different to the tag you have ...

Код HTML:
INI_SetTag(File,"Player's Data");
to

Код HTML:
INI_SetTag(File,"user");
i'm not so sure that will work , but give a try .
Reply
#3

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
Код HTML:
public loadaccount_user
Код HTML:
INI_SetTag(File,"Player's Data");
The loadaccount_%s it's different to the tag you have ...

Код HTML:
INI_SetTag(File,"Player's Data");
to

Код HTML:
INI_SetTag(File,"user");
i'm not so sure that will work , but give a try .
i didnt really get u but i think the issue is pretty much here

Код:
if(dialogid == dlogin)
    {
        if(!response) return Kick(playerid);
        if(response)
        {
            new hashpass[129];
            WP_Hash(hashpass,sizeof(hashpass),inputtext);
            if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false))
            {
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
                SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
                GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
                SendClientMessage(playerid,COLOR_YELLOW,"INFO: You have successfully logged in.");
            }
            else
            {
                ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","This account is registered. \nWrite your password please.","Login","Quit");
                return 1;
            }
        }
    }
thats in OnDialogResponse , i dont know why this line is not working
Reply
#4

Change where you find in your script that

Код:
INI_SetTag(File,"Player's Data");
with that

Код:
INI_SetTag(File,"user");
and tell me if that work
Reply
#5

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
Change where you find in your script that

Код:
INI_SetTag(File,"Player's Data");
with that

Код:
INI_SetTag(File,"user");
and tell me if that work
nope , still doesnt work
Reply
#6

Check if 'hashpass' or 'PlayerInfo[playerid][pPass]' are empty strings.

Strcmp returns 0 if either of the two strings being compared are empty/null.
Reply
#7

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Check if 'hashpass' or 'PlayerInfo[playerid][pPass]' are empty strings.

Strcmp returns 0 if either of the two strings being compared are empty/null.
i think they're empty tho , i tried deleting (new hashpass[129] from both and adding it on the top of the gm
Reply
#8

I've never actively used Y_Ini, but I seem to remember something about not using spaces or special characters in tags. Stick to lower case ASCII only. You might want to check the tags in the file, too.
Reply
#9

nvm i solved the problem. Thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)