new 3D crashing login login script
#1

Hello!

Since i changed to 3D you cant login, when you enter your pass and press enter to spawn, you get disconnected.
Its the same if you make a new account

If someone could take a look and tell me what is bugging for the 3D i would be glad

CODE:
pawn Code:
forward OnPlayerLogin(playerid,password[]);
forward OnPlayerRegister(playerid, password[]);

public OnPlayerLogin(playerid,password[])
{
    if(IsPlayerNPC(playerid)) return 1;
    new file[64];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));

    format(file, sizeof(file), "/Users/%s.ini", playername3);

    if (dini_Exists(file))
    {
        new password2 = num_hash(password);
        if(dini_Int(file,"Password") == password2)
        {
            Member[playerid] = dini_Int(file, "Member");
            Leader[playerid] = dini_Int(file,"Leader");
            IsInOrg[playerid] = dini_Int(file,"Status");
            IsLaw[playerid] = dini_Int(file,"Law");
            request[playerid] = dini_Int(file,"Request");
            IsRequesting[playerid] = dini_Int(file,"Isrequesting");
            SetPlayerScore(playerid, dini_Int(file,"Score"));
            SetPlayerMoney(playerid, dini_Int(file,"Cash"));
            Jail[playerid] = dini_Int(file, "Jail");
            PlayerInfo[playerid][Admin] = dini_Int(file, "Admin");
            Radio[playerid] = dini_Int(file, "Radio");
        }
        else
        {
            gPlayerLogTries[playerid] += 1;
            ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Once againg!",""ALB"You have typed a wrong password\n"ALB"Type your password here to log-in!","Log-in","Quit");
            return 1;
        }
    }
    SpawnPlayer(playerid);
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1234)
    {
        if(response)
        {
            if(IsPlayerNPC(playerid)) return 1;
            new playername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername, sizeof(playername));
            new string[64];
            format(string, sizeof(string), "/Users/%s.ini", playername);
            if (dini_Exists(string))
            {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Welcome.Please log-in.",""ALB"Type your password here to log-in","Log-in","Quit");
            }
            else
            {
                ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,""ALB"Please register!",""ALB"Type your password here to register.","Register","Quit");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY,"*You refused. You must accept the rules to play.");

        }
    }
    if(dialogid == 1245)
    {
        if(response)
        {
            strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
            if(!strcmp(Typed[playerid], "None", true))
            {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Once again.",""ALB"You didn't type a correct password!\n"ALB"Type you password here to register.","Log-in","Quit");
            }
            else
            {
                OnPlayerLogin(playerid, inputtext);
            }
        }
    }
    if(dialogid == 1246)
    {
        if(response == 1)
        {
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new string[512];
            format(string, sizeof(string),""ALB"Nume: "LIGHTBLUE"%s\n"ALB"Pass: "LIGHTBLUE"%s,\n"ALB"Money: "LIGHTBLUE"10000\n"ALB"Score: "LIGHTBLUE"500",sendername,inputtext);
            ShowPlayerDialog(playerid, 1242, DIALOG_STYLE_MSGBOX, ""LIGHTBLUE"Account succesfully registred",string,"Ok","");
            OnPlayerRegister(playerid, inputtext);
        }
    }
    return 1;
}
Reply


Messages In This Thread
new 3D crashing login login script - by cruising - 03.01.2012, 23:09
Re: new 3D crashing login login script - by Diovis - 03.01.2012, 23:22
Re: new 3D crashing login login script - by SchurmanCQC - 03.01.2012, 23:25
Re: new 3D crashing login login script - by cruising - 03.01.2012, 23:49
Re: new 3D crashing login login script - by Basssiiie - 03.01.2012, 23:56
Re: new 3D crashing login login script - by cruising - 04.01.2012, 00:05
Re: new 3D crashing login login script - by Basssiiie - 04.01.2012, 00:10
AW: new 3D crashing login login script - by BigETI - 04.01.2012, 00:15
Re: new 3D crashing login login script - by cruising - 04.01.2012, 00:32

Forum Jump:


Users browsing this thread: 2 Guest(s)