Register Dialog appears whenever I spawn
#5

Quote:
Originally Posted by maramizo
Посмотреть сообщение
Just the register dialog ID.
I found this on my luxadmin.

pawn Код:
//==============================================================================
//---------------
// Dialog - REGISTER
//---------------
//==============================================================================
    if (dialogid == DIALOGID+66)
    {
        if(response == 0 && ServerInfo[MustRegister] == 1)
        {
            Kick(playerid);
        }
        if(response)
        {
            if (strlen(inputtext) < 4 || strlen(inputtext) > 20)
            {
                new rstring[256];
                format(rstring,256,"Sorry %s\n\nThe length of your password should contain more \nthan 3 characters and less than 20 characters! \n\n Please, re-enter the Password:",pName(playerid));
                return ShowPlayerDialog(playerid,DIALOGID+68,DIALOG_STYLE_INPUT,"Register Error!",rstring,"Register","Quit");
            }
            if (udb_Create(PlayerName2(playerid)))
            {
                ShowPlayerDialog(playerid,DIALOG_TYPE_QUESTION,DIALOG_STYLE_INPUT,"Account Safety Question","{D7E4F0}Type a security question, for when you forget\n your password, you just answer this Question.","Next","End");
                new file[256],name[MAX_PLAYER_NAME], buf[145],tmp3[100];
                new strdate[20], year,month,day;
                getdate(year, month, day);
                WP_Hash(buf, sizeof(buf), inputtext);
                GetPlayerName(playerid,name,sizeof(name));
                format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(name));
                GetPlayerIp(playerid,tmp3,100);
                dini_Set(file,"Password",buf);
                dini_Set(file,"Ip",tmp3);
                dUserSetINT(PlayerName2(playerid)).("Registered",1);
                format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
                dini_Set(file,"RegisteredDate",strdate);
                dUserSetINT(PlayerName2(playerid)).("Loggedin",1);
                dUserSetINT(PlayerName2(playerid)).("Banned",0);
                dUserSetINT(PlayerName2(playerid)).("Level",0);
                dUserSetINT(PlayerName2(playerid)).("AccountType",0);
                dUserSetINT(PlayerName2(playerid)).("LastOn",0);
                dUserSetINT(PlayerName2(playerid)).("Money",0);
                dUserSetINT(PlayerName2(playerid)).("Kills",0);
                dUserSetINT(PlayerName2(playerid)).("Deaths",0);
                dUserSetINT(PlayerName2(playerid)).("WantedLevel",0);
                #if SaveScore == true
                dUserSetINT(PlayerName2(playerid)).("Score",0);
                #endif
                dUserSetINT(PlayerName2(playerid)).("Hours",0);
                dUserSetINT(PlayerName2(playerid)).("Minutes",0);
                dUserSetINT(PlayerName2(playerid)).("Seconds",0);
                AccInfo[playerid][LoggedIn] = 1;
                AccInfo[playerid][Registered] = 1;
                SendClientMessage(playerid, green, "You are now Registered, and have been automaticaly Logged in!");
                PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Register Dialog appears whenever I spawn - by kbalor - 27.07.2012, 17:57
Re: Register Dialog appears whenever I spawn - by Joao Pedro - 27.07.2012, 18:06
Re: Register Dialog appears whenever I spawn - by kbalor - 27.07.2012, 18:15
Re: Register Dialog appears whenever I spawn - by maramizo - 27.07.2012, 18:19
Re: Register Dialog appears whenever I spawn - by kbalor - 27.07.2012, 18:26
Re: Register Dialog appears whenever I spawn - by kbalor - 27.07.2012, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)