Y-INI help
#8

I did this in stead:
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    new buf[129];
    INI_String("password", buf, sizeof(buf));
    PlayerInfo[playerid][pPassword] = strval(buf);
    return 1;
}
And in OnPlayerConnect:
pawn Код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
And when the login dialog responds in OnDialogRespond:
pawn Код:
new buf[129];
if (WP_Hash(buf, sizeof(buf), inputtext) != PlayerInfo[playerid][pPassword])
{
    new string[80 + MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "{FFFF00}Your username: {FFFFFF}%s\n\n{AF0000}Incorrect password!\n\n{FFFF00}Enter your Password to log in",name);
    ShowPlayerDialog(playerid, MENU_LOGIN, DIALOG_STYLE_PASSWORD, "Hopes Hills RP Account", string, "Login", "Quit");
}
else
{
    SendClientMessage(playerid, COLOR_GREEN, "-MSG- Welcome back!");
}
It does not give any errors when I compile, but no matter what password I type when logging in, I get logged in.
Reply


Messages In This Thread
Y-INI help - by sim_sima - 15.12.2013, 19:26
Re: Y-INI help - by xVIP3Rx - 15.12.2013, 19:33
Re: Y-INI help - by sim_sima - 15.12.2013, 19:35
Re: Y-INI help - by xVIP3Rx - 15.12.2013, 19:37
Re: Y-INI help - by sim_sima - 15.12.2013, 19:42
Re: Y-INI help - by sim_sima - 15.12.2013, 20:03
Re: Y-INI help - by Hansrutger - 15.12.2013, 20:12
Re: Y-INI help - by sim_sima - 15.12.2013, 20:20

Forum Jump:


Users browsing this thread: 3 Guest(s)