Problem with Dialog
#1

Hey.
I got some problems with my Dialog menu.
When i press Look_Behind, its open a Menu for me.

And when i press escape, close OR return, it makes everytime the same.
Its open the Dialog, that should come when i open the first in the list.
And on the 2nd Dialog i have the same problem.
When i press somethink, its accept it automatic as return.

Pls help me
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Haupt){
 
        if(response == 0)
        if(listitem == 0){
        {
        ShowPlayerDialog(playerid, Chat, DIALOG_STYLE_LIST, "Was kann ich fьr Sie tun'?", "BegrьЯung\nVerabschiedung\nKompliment\nEinstellungen", "Auswдhlen", "SchlieЯen");
        }
        }
        }

if(dialogid == Chat){
    if(listitem == 0){
        new string[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof (name));
        format(string, sizeof(string), "[%s]: Guten Morgen Jungs und Mдddels! Wie geht es euch",name);
        SendClientMessageToAll(0x0ffffff, string);
    }
    if(listitem == 1){
        new string[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof (name));
        format(string, sizeof(string), "[%s]: TschьЯ und Aufwiedersehen Jungs und Mдddels! Sehen uns!",name);
        SendClientMessageToAll(0x0ffffff, string);
    }
}
Reply
#2

Try this:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == Haupt)
    {
    if(response)
    {
          if(listitem == 0)
            {
            ShowPlayerDialog(playerid, Chat, DIALOG_STYLE_LIST, "Was kann ich fьr Sie tun'?", "BegrьЯung\nVerabschiedung\nKompliment\nEinstellungen", "Auswдhlen", "SchlieЯen");
            }
    }
    }
  if(dialogid == Chat)
    {
      if(listitem == 0)
        {
          new string[128];
          new name[MAX_PLAYER_NAME];
          GetPlayerName(playerid, name, sizeof (name));
          format(string, sizeof(string), "[%s]: Guten Morgen Jungs und Mдddels! Wie geht es euch",name);
          SendClientMessageToAll(0x0ffffff, string);
        }
      if(listitem == 1)
        {
          new string[128];
          new name[MAX_PLAYER_NAME];
          GetPlayerName(playerid, name, sizeof (name));
          format(string, sizeof(string), "[%s]: TschьЯ und Aufwiedersehen Jungs und Mдddels! Sehen uns!",name);
          SendClientMessageToAll(0x0ffffff, string);
    }
}
Reply
#3

Ah good job.
But now i have the problem too in next Dialog, named Chat.

shall i put there this
pawn Код:
if(response)
    {
?
Reply
#4

Yep.
Reply
#5

Ah, ok ty.
I now understand how it works
pawn Код:
if(dialogid == THE ID)
    {
      if(response)
        {
        if(listitem == 0)
        {
        //Somethink there
        }
        if(listitem == 1)
        {
        //Somethink there
        }
}
}
Thats true?
Reply
#6

Yep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)