Problem with registration
#1

Hi. I have problem with user registration.

When I join my server, dialog will be shown, and two buttons "Register" and "Quit", and when I press "Quit" without filling any password I got kick. Which is normal. But in "Users" folder "Name.ini" is created. I would like it like, when I press "Quit" there is no .ini file in "Users" folder. Hope you understood.

pawn Код:
if(dialogid == UserRegister)
    {
        if(!response) return Kick(playerid);
        }
        if(response)
        {
            if(!strlen(inputtext))
            {
                ShowPlayerDialog(playerid, UserRegister, DIALOG_STYLE_INPUT, "Register", "Welcome back to {"DialogRed"}eGaming Roleplay{"DialogText"}.\n\nEnter your password to register.", "Register", "Quit");
                return 1;
            }
            new hashpass[129];
            WP_Hash(hashpass, sizeof(hashpass), inputtext);
            new INI:file = INI_Open(Path(playerid));
            INI_SetTag(file, "Player's Data");
            INI_WriteString(file, "Password", hashpass);
            INI_WriteInt(file,"AdminLevel", 0);
            INI_WriteInt(file,"VIPLevel", 0);
            INI_WriteInt(file,"Money", 0);
            INI_WriteInt(file,"Scores", 0);
            INI_WriteInt(file,"Kills", 0);
            INI_WriteInt(file,"Deaths", 0);
            INI_WriteInt(file, "Skin", -1);
            INI_Close(file);
            SendClientMessage(playerid, YELLOW, "You have been successfully registered.");
            SetPlayerColor(playerid, WHITE);
            return 1;
        }
    }
Reply


Messages In This Thread
Problem with registration - by RedJohn - 29.07.2013, 22:29
Re: Problem with registration - by RedJohn - 30.07.2013, 11:53
Re: Problem with registration - by DobbysGamertag - 30.07.2013, 12:08
Re: Problem with registration - by RedJohn - 30.07.2013, 12:18
Re: Problem with registration - by RedJohn - 30.07.2013, 12:22
Re: Problem with registration - by RedJohn - 01.08.2013, 09:09
Re: Problem with registration - by RedJohn - 02.08.2013, 13:18

Forum Jump:


Users browsing this thread: 2 Guest(s)