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
#2

Bump!
Reply
#3

Have you tried https://sampwiki.blast.hk/wiki/Fremove ?
Reply
#4

Hmm. No I didn't. Let me try.
Reply
#5

Can't make it working.

Register done using this tut: https://sampforum.blast.hk/showthread.php?tid=352703

Can you tell me what should I do?

EDIT: Sorry for double post.
Reply
#6

BUMP.
Reply
#7

Bumpity bump.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)