password problem :/
#5

pawn Код:
else if(dialogid == 1) // Register
    {
        if(response)
        {
            if(strlen(inputtext) < 6)
            {
             SendClientMessage(playerid, COLOR_GREY, "Password can't be shorter than 6 characters.");
             ShowDialog(playerid, 1);
             return 1;
            }
            if(strlen(inputtext) > 256)
            {
                SendClientMessage(playerid, COLOR_GREY, "Password can't be longer than 256 characters.");
                ShowDialog(playerid, 1);
                return 1;
            }
            new file[64], IP[16], string[128], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                WP_Hash(password, sizeof(password), inputtext);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
                format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}RealCity RPG{FFFFFF}. (Password: %s)", inputtext);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
                ShowDialog(playerid, 2);
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You have chosen to quit the server.");
            FixedKick(playerid);
        }
    }
Reply


Messages In This Thread
password problem :/ - by Rabea - 26.01.2015, 17:15
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:24
Re: password problem :/ - by Rabea - 26.01.2015, 17:29
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:35
Re: password problem :/ - by Rabea - 26.01.2015, 17:38
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:45
Re: password problem :/ - by Rabea - 26.01.2015, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)