[Ajuda] Mesmo que eu me registre, quando vou digitar a senha, diz que estб incorreta
#5

pawn Код:
if(dialogid == DIALOG_REGISTRO)
    {
        if(!strval(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite apenas nъmeros!\nDigite sua senha novamente para se registrar!", "Confirma", "Cancelar");
        if(!response) return Kick(playerid);
        else
        {
            SalvarContas(playerid,inputtext);
            ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк se cadastrou, agora й sу logar com sua senha registrada!", "Confirma", "Cancelar");
        }
    }
    if(dialogid == DIALOG_LOGAR)
    {
        if(!strval(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Digite apenas nъmeros!\nDigite sua senha cadastrada para logar!\nSe errar 5 vezes sua conta serб banida!", "Confirma", "Cancelar");
        if(!response) return Kick(playerid);
        else
        {
            Info[playerid][zSenha] = DOF2_GetString(Contas(playerid), "Senha");
            if(strcmp(inputtext,Info[playerid][zSenha], true)==0)
            {
                Info[playerid][zAdmin] = DOF2_GetInt(Contas(playerid), "Admin");
                Info[playerid][zRespeito] = DOF2_GetInt(Contas(playerid), "Respeito");
                SetPlayerScore(playerid, Info[playerid][zLevel]);
                Info[playerid][zLevel] = DOF2_GetInt(Contas(playerid), "Level");
                Info[playerid][zDinheiro] = DOF2_GetInt(Contas(playerid), "Dinheiro");
                GivePlayerMoney(playerid, Info[playerid][zDinheiro]);
                Profissao[playerid] = DOF2_GetInt(Contas(playerid), "Profissao");
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк digitou sua senha errado, digite-a novamente para logar!\nSe errar 5 vezes sua conta serб banida!", "Confirma", "Cancelar");
                Erro[playerid]++;
                if(Erro[playerid] == 5)
                {
                    SendClientMessage(playerid, -1, "Sua conta estб banida por errar 5 vezes a sua senha, contacte o Admin para retirar seu Ban!");
                    Ban(playerid);
                    return 1;
                }
            }
        }
    }
   
stock SalvarContas(playerid,string[])
{
    if(!DOF2_FileExists(Contas(playerid)))
    {
        DOF2_CreateFile(Contas(playerid));
        DOF2_SetString(Contas(playerid),"Senha",string);
        DOF2_SetInt(Contas(playerid), "Admin", 0);
        DOF2_SetInt(Contas(playerid), "Profissao", 0);
        DOF2_SetInt(Contas(playerid), "Level", 0);
        DOF2_SetInt(Contas(playerid), "Respeito", 0);
        DOF2_SetInt(Contas(playerid), "Dinheiro", 0);
        DOF2_SaveFile();
    }
    else
    {
        DOF2_SetInt(Contas(playerid), "Admin", Info[playerid][zAdmin]);
        DOF2_SetInt(Contas(playerid), "Profissao", Profissao[playerid]);
        Info[playerid][zLevel] = GetPlayerScore(playerid);
        DOF2_SetInt(Contas(playerid), "Level", Info[playerid][zLevel]);
        DOF2_SetInt(Contas(playerid), "Respeito", Info[playerid][zRespeito]);
        Info[playerid][zDinheiro] = GetPlayerMoney(playerid);
        DOF2_SetInt(Contas(playerid), "Dinheiro", Info[playerid][zDinheiro]);
        DOF2_SaveFile();
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)