[Ajuda] Dialog Style List nгo funciona?
#1

Fiz tudo certinho, porйm quando eu clico na lista 0 que й Caminhoneiro nem acontece nada... era pra virar caminhoneiro:

pawn Код:
if(dialogid == 1998)
    {
        if(response)
        {
          if(listitem == 0) // Caminhoneiro
          {
               new arquivo[40]; // variavel arquivo
               if(DOF2_SetInt(arquivo, "Level")> -1)
               {
                  new aname[MAX_PLAYER_NAME];
                  GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
                  SendClientMessage(playerid, 0x00FF00AA, "[ > ] Vocк virou um caminhoneiro!");
                  PlayerPlaySound(playerid, 1057, 0, 0, 0);
               }
               return 1;
          }
          else if(listitem == 1)
          {
              return 1;
          }
          else if(listitem == 2)
          {
              return 1;
          }
          else if(listitem == 3)
          {
              return 1;
          }
          else if(listitem == 3)
          {
              return 1;
          }
          else if(listitem == 4)
          {
              return 1;
          }

        }
        return 1;
    }

pawn Код:
// no topo
#define DialogProfissoes                                                           1998
Reply
#2

Tente...
trocar:
pawn Код:
if(DOF2_SetInt(arquivo, "Level")> -1)
por:
pawn Код:
if(DOF2_GetInt(arquivo, "Level")> -1)
#Edit:
pawn Код:
if(listitem == 0) // Caminhoneiro
          {
               new arquivo[40], Nome[MAX_PLAYER_NAME]; // variavel arquivo
               GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
               format(arquivo, sizeof arquivo, "Contas/%s.ini", Nome);
               
               if(DOF2_GetInt(arquivo, "Level")> -1){
               
                  new aname[MAX_PLAYER_NAME];
                  GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
                  SendClientMessage(playerid, 0x00FF00AA, "[ > ] Vocк virou um caminhoneiro!");
                  PlayerPlaySound(playerid, 1057, 0, 0, 0);
               }
               return 1;
          }
Aqui
pawn Код:
"Contas/%s.ini"
Aqui vocк troca para a pasta do seu servidor.
Reply
#3

Quote:
Originally Posted by ForT
Посмотреть сообщение
Tente...
trocar:
pawn Код:
if(DOF2_SetInt(arquivo, "Level")> -1)
por:
pawn Код:
if(DOF2_GetInt(arquivo, "Level")> -1)
Pode ter certeza que este й o problema.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)