Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Entrar

descriptionComo mover um objeto ao clicar em um dialog list EmptyComo mover um objeto ao clicar em um dialog list

more_horiz
Problema: Estou criando um sistema de apartamentos com elevador mais nao estou conseguindo fazer pra ao clicar em uma das opções move o objeto

GM Base: Brasil Mega Life

Code:

Código:

new ElevadorApartamentos;

#define ElevadorAptos                    201200

ElevadorApartamentos = CreateObject(18755, 1786.62, -1303.28, 14.54, 0.00, 0.00, 270.35);

   if (dialogid == ElevadorAptos)
   {
       if (response)
       {
           if (listitem == 0)
           {
                    MoveObject( ElevadorApartamentos, 1786.62, -1303.28, 14.54, 0.00, 0.00, 270.35);
            }
           if (listitem == 1)
           {
            }
           if (listitem == 2)
           {
            }
           if (listitem == 3)
           {
            }
           if (listitem == 4)
           {
            }
           if (listitem == 5)
           {
            }
           if (listitem == 6)
           {
            }
           if (listitem == 7)
           {
            }
             if (listitem == 8)
           {
            }
             if (listitem == 9)
           {
            }
             if (listitem == 10)
           {
            }
             if (listitem == 11)
           {
            }
             if (listitem == 12)
           {
            }
             if (listitem == 13)
           {
            }
             if (listitem == 14)
           {
            }
             if (listitem == 15)
           {
            }
             if (listitem == 16)
           {
            }
            if (listitem == 17)
           {
            }
            if (listitem == 18)
           {
            }
       }
       else
       {
       }
   }

     if (strcmp(cmd, "/elevador", true) == 0)
   {
       if(IsPlayerConnected(playerid))
      {
          if(PlayerToPoint(1.5,playerid, 1785.3308,-1302.5597,13.5789))
            {
          ShowPlayerDialog(playerid,ElevadorAptos,DIALOG_STYLE_LIST,"Elevador Apartamentos","1º Andar\n2º Andar\n3º Andar\n4º Andar\n5º Andar\n6º Andar\n7º Andar\n8º Andar\n9º Andar\n10º Andar\n11º Andar\n12º Andar\n13º Andar\n14º Andar\n15º Andar\n16º Andar\n17º Andar\n18º Andar\n19º Andar","Ir","Cancelar");
            }
      }
      return true;
   }

descriptionComo mover um objeto ao clicar em um dialog list EmptyRe: Como mover um objeto ao clicar em um dialog list

more_horiz
Olá,
Não sou muito bom no pawn, Mais com o que eu sei tento ajudar as pessoas ( penso eu, que parece ser um bom jeito de me aperfeiçoar).
Fiz um sistema básico para você, espero que funcione:


Código:

new ElevadorApartamentos;

#define ElevadorAptos                    201200

ElevadorApartamentos = CreateObject(18755, 1786.62, -1303.28, 14.54, 0.00, 0.00, 270.35);

  if(dialogid == ElevadorAptos)
  {
      Controle(playerid, 1);
      if(!response)
    {
        return true;
    }
      switch(listitem)
        {
            case 0:
        {
              MoveObject( ElevadorApartamentos, 1786.62, -1303.28, 14.54, 0.00, 0.00, 270.35);
        }
        case 1:
        {

        }
        case 2:
        {

        }
        case 3:
        {

        }
      }
    }
//============================================= Cmd para abrir o dialogo
    if (strcmp(cmd, "/elevador", true) == 0)
  {
      if(IsPlayerConnected(playerid))
      {
          if(PlayerToPoint(1.5,playerid, 1785.3308,-1302.5597,13.5789))
            {
            ShowPlayerDialog(playerid,ElevadorAptos,DIALOG_STYLE_LIST,"Elevador Apartamentos","1º Andar\n2º Andar\n3º Andar\n4º Andar\n5º Andar\n6º Andar\n7º Andar\n8º Andar\n9º Andar\n10º Andar\n11º Andar\n12º Andar\n13º Andar\n14º Andar\n15º Andar\n16º Andar\n17º Andar\n18º Andar\n19º Andar","Ir","Cancelar");
            }
      }
      return true;
  }

Se funcionar deixa um aviso aqui no forum, e pede pra um ADM feichar o tópico.
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder