Jump to content

De ce nu ma spawneaza ?


GamerulFOX

Recommended Posts

De ce nu ma spawneaza ?

 

if (dialogid == REGISTER)
    {
        new name[MAX_PLAYER_NAME], file[256], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SAVE, name);
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Salut, nu esti registrat.", "Te rog scrie o parola.", "Register", "inchide");
        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] = 100);
        dini_IntSet(file, "Score",PlayerInfo[playerid][pLevel] = 0);
        dini_IntSet(file, "Job", PlayerInfo[playerid][pJob] = 0);
        SpawnPlayer(playerid);
        format(string, 128, "Te-ai logat cu succes ! Nume : %s | Parola : %s.", name, inputtext);
        SpawnPlayer(playerid);
        GivePlayerMoney(playerid, 100);
        SpawnPlayer(playerid);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        SpawnPlayer(playerid);
        gPlayerLogged[playerid] = 1;
        SpawnPlayer(playerid);
    }
    if (dialogid == LOGIN)
    {
        new name[MAX_PLAYER_NAME], file[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SAVE, name);
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave");
        new tmp;
        tmp = dini_Int(file, "Password");
        if(udb_hash(inputtext) != tmp) {
            SendClientMessage(playerid, COLOR_RED, "Parola gresita !");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Salut, esti inregistrat.", "Te rog scrie parola.", "Login", "inchide");
        }
        else
        {
            SpawnPlayer(playerid);
            gPlayerLogged[playerid] = 1;
            PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
            SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
            GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
            PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
            SendClientMessage(playerid,COLOR_RED, "Te-ai logat cu succes !");
            SpawnPlayer(playerid);
    }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.