SA-MP Forums Archive
[AJUDA]Pq n funfa? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]Pq n funfa? (/showthread.php?tid=197422)



[AJUDA]Pq n funfa? - Kasura - 08.12.2010

Comando
pawn Код:
if(strcmp(cmd, "/SLogar", true) == 0) {
        ShowPlayerDialog(playerid,9912,DIALOG_STYLE_INPUT,"Conta [SB]Admin","Conta [SB]Admin","Logar","Cancelar");
        return 1;
    }
public
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 9912)
{
if(response)
{
new file[128], string[128];
if(strlen(inputtext) == 0)
{
format(string, sizeof string, "Por favor digite a senha de acesso");
ShowPlayerDialog(playerid, 9912, DIALOG_STYLE_INPUT, "Conta", string, "Logar", "Cancelar");
return 0;
}
format(file,sizeof(file),"/sbadmin/SBSenha.txt");
if(fexist(file))
{
new password = dini_Int(file, "Senha");
if(udb_hash(inputtext) != password)
{
}
else
{
SendClientMessage(playerid, 0x007FFFAA, "[SERVIDOR]: Vocк logou-se com sucesso!");
CarregarBD(playerid);
}
}
}
}
return 1;
}
eu digito a senha e vou em logar e nada acontece -.-

@OBS
EM DIALOG N FUNFO =/
mas em texto eu consigo =/


Re: [AJUDA]Pq n funfa? - rjjj - 08.12.2010

@Kasura, pelo que eu entendi vocк confudiu a ordem dos botхes.


Arrumei o cуdigo do OnDialogResponse pra vocк. Espero ter ajudado


pawn Код:
if(dialogid == 9912)
        {
            new file[128], string[128];
            if(response == 0)//Botгo esquerdo
            {
                if(strlen(inputtext) == 0)
                {
                    format(string, sizeof string, "Por favor digite a senha de acesso");
                    ShowPlayerDialog(playerid, 9912, DIALOG_STYLE_INPUT, "Conta", string, "Logar", "Cancelar");
                    return 0;
                }
            }
            if(response == 1)//Botгo direito
            {
                format(file,sizeof(file),"/sbadmin/SBSenha.txt");
                if(fexist(file))
                {
                    new password = dini_Int(file, "Senha");
                    if(udb_hash(inputtext) != password)
                }
                if(udb_hash(inputtext) != password)
                {
                }
                else
                {
                    SendClientMessage(playerid, 0x007FFFAA, "[SERVIDOR]: Vocк logou-se com sucesso!");
                    CarregarBD(playerid);
                }
                return 1;
            }
            return 1;
        }



Re: [AJUDA]Pq n funfa? - Kasura - 09.12.2010

Nгo funcionou ainda n da resultado =/


Re: [AJUDA]Pq n funfa? - Manteiga01 - 09.12.2010

Troca :
ShowPlayerDialog(playerid, 9912, DIALOG_STYLE_INPUT, "Conta", string, "Logar", "Cancelar");
Por:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Co nta","Coloque sua senha","Logar","Cancelar");

OBS: Troque o ID do dialog!!

#OFF:
Nossa vc tem 9912 dialogs!? 0o


Re: [AJUDA]Pq n funfa? - Kasura - 09.12.2010

N funcionou =/
vlws ai irei fazer em forma de comando mesmo ^^

OBS: Apуs terminar o novo sbcomandos 3.3

Irei preparar a versгo 14.0 FINAL do LVB
e
Postar meu novo Projeto WCB = World Crime Brasil
O gamemode atual do servidor brasil =D