Login Code Fail/
#2

It's because when you didnt enter something you create the file.

So here

pawn Код:
if (dialogid == Register)
   {
        new name[MAX_PLAYER_NAME], file[256], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SERVER_USER_FILE, name);
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return
        ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "{33AA33}Las Vegas Real Life - Registration", string, "Register", "Leave");
        dini_Create(file);
        dini_IntSet(file, "Password", udb_hash(inputtext));
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
        dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
        dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
        format(string, 128, "[SYSTEM]: You succesfully registered the Username %s with password %s, you have been auto logged in.", name, inputtext);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        gPlayerLogged[playerid] = 1;
   }
Reply


Messages In This Thread
Login Code Fail/ - by [UG]Scripter - 28.04.2011, 18:11
Re: Login Code Fail/ - by xir - 28.04.2011, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)