Problem with Registration and Login
#2

Switch your register command to this one.
pawn Код:
CMD:register(playerid, params[])  
{
    new sStr[64];
    if(gPlayerLogged[playerid] == 1)
        return SendClientMessage(playerid, COLOR_GREY, " You're already logged.");

    format(sStr, 64, "Players/%s.ini", PlayerName(playerid));
    new File: hFile = fopen(sStr, io_read);
    if(hFile)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "This Nick already exists, use another.");
        fclose(hFile);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "TEST", "TEST\n{5CACEE}Enter your Password to Register!", "Register", "Cancel");
        return 1;
    }
    new tmppass[64];
    if(sscanf(params, "s[64]", tmppass))
    {
        OnPlayerRegister(playerid, tmppass);
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "/register [password]");
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "TEST", "TEST\n{5CACEE}Enter your Password to Register!", "Register", "Cancel");
    }
    return 1;
}
What's changed:
pawn Код:
if(sscanf(params, "d[64]", tmppass))
to
pawn Код:
if(sscanf(params, "s[64]", tmppass))
Reply


Messages In This Thread
Problem with Registration and Login - by EditPawn - 22.05.2012, 15:44
Re: Problem with Registration and Login - by Ruben_Alonso - 22.05.2012, 15:49
Re: Problem with Registration and Login - by EditPawn - 22.05.2012, 16:13
Re: Problem with Registration and Login - by kikito - 22.05.2012, 16:21

Forum Jump:


Users browsing this thread: 2 Guest(s)