>>> [HELP] Problem with logging in! <<<
#1

When i connect to server, it says you dont have an account, please register (Even if i have!). Then i fill "new account" password in it, and press enter, then it says that that account allready exists, please get another name. LOL.

As i know, it doesnt make ''gPlayerAccount[playerid] = 1;'' to really 1, it does 0 no matter what...
pawn Код:
GetPlayerName(playerid, plname, sizeof(plname));
    format(string, sizeof(string), "accounts/%s.ini", plname);
    if(fexist(string))
    {
        new loginstring[128];
        new loginname[64];
        gPlayerAccount[playerid] = 1;
        GetPlayerName(playerid,loginname,sizeof(loginname));
        format(loginstring,sizeof(loginstring),"Welcome, %s\nThat nick is registered.\nYou can now login:",loginname);
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
        return 1;
    }
    else
    {
        new regstring[128];
        new regname[64];
        gPlayerAccount[playerid] = 0;
        GetPlayerName(playerid,regname,sizeof(regname));
        format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
        return 1;
    }
Any ideas why it jumps over like that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)