[Ajuda] Ajuda Adaptaзгo Entre Sistema De Login em SII e Tutorial
#1

Bom Gente eu ja tenteiiiiii de tudo
como faзo para
adaptar esse Login , Registro Em SII(Coloquei No Meu Gm Deu Certo Sozinho): https://sampforum.blast.hk/showthread.php?tid=318868

e Adaptar Esse Sistema De Tutorial: https://sampforum.blast.hk/showthread.php?tid=202389

Queria Que Quando O Cara Se Registra-se Comeзaria O Tutorial Ai , Mas Quando Logar Nгo Queria Que Ainda Tivesse O Tutorial!!!

Me Ajudem Pf!!!
Reply
#2

sу juntar os dois pra aparecer o sistema de tutorial, ai pro tutorial aparecer depois do registro creio que assim darб certo:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTRO:
        {
            if (!response) return Kick(playerid);
            if (response)
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, ""BRANCO"Registrando...",""VERMELHO"Vocк digitou uma senha invбlida.\n"BRANCO"Digite sua senha abaixo para registrar uma nova conta.","Registro","Quit");
                }

                if(INI_Open(ObterINI(playerid))) {
                INI_WriteString("Senha",inputtext);
                INI_WriteInt("Score",1);
                INI_WriteInt("Dinheiro",5000);
                INI_WriteInt("Admin",0);

                INI_Save();
                INI_Close();
      ShowPlayerDialog(playerid, 1,DIALOG_STYLE_MSGBOX,"Tutorial de inicio","Bem vindo ao tutorial de inicio/nPosnha seu texto aqui, "Proximo","Fechar"
                }
        }
    }
        case DIALOG_LOGAR:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_INPUT, "
"BRANCO"Logar",""VERMELHO"Vocк digitou uma senha invбlida.\n"BRANCO"Digite sua senha abaixo para efetuar login.","Logar","Quit");
                }

                if(INI_Open(ObterINI(playerid))) {
                INI_ReadString(PlayerInfo[playerid][pSenha],"
Senha",20);

                if(strcmp(inputtext,PlayerInfo[playerid][pSenha],false)) {
                ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_INPUT, "
"BRANCO"Logar",""VERMELHO"Vocк digitou uma senha incorreta.\n"BRANCO"Digite sua senha abaixo para acessar.","Logar","Quit");
                }

                SetPlayerScore( playerid, INI_ReadInt("
Score" ) );
                ResetPlayerMoney( playerid );
                GivePlayerMoney( playerid, INI_ReadInt( "
Dinheiro" ) );
                PlayerInfo[playerid][pAdmin] = INI_ReadInt("
Admin");
                INI_Close();
                }
            }
        }
    }
    return 1;
}
OnDialogResponse:
pawn Код:
{
    if(dialogid == 1)
    {
       if(response)
       {
          ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Parte 1", "Esta й a primeira parte do seu tutorial!\nLeia com atenзгo!", "Proximo", "Sair");
          SetPlayerPos(playerid, Cord. X, Cord. Y, Cord. Z); // Local da camera, onde for passando o tut.

       }
       else
       {
          Kick(playerid);
       }
    }
     if(dialogid == 2)
      {
      if(response)
      {
         ShowPlayerDialog(playerid,3, DIALOG_STYLE_MSGBOX,"Parte 2", "Pronto acabou seu tutorial", "Ok", "Ok");
         SetPlayerPos(playerid, Cord. X, Cord. Y, Cord. Z); // Posiзгo inicial do server
         SendClientMessage(playerid,0xFFFFFFAA,"Pronto, seu tutorial acabou");
         ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_INPUT,""BRANCO"Logar",""BRANCO"Digite sua senha abaixo para efetuar login.","Logar","Quit");
       }
       }
testa ai e vк se funciona, e tome cuidado com os ids das dialogs para nao dar erro.
@edit: lembrando que este nгo й o codigo inteiro
Reply
#3

Deu Erro no

ShowPlayerDialog(playerid, 1,DIALOG_STYLE_MSGBOX,"Tutorial de inicio","Bem vindo ao tutorial de inicio/nPosnha seu texto aqui, "Proximo","Fechar"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)