Need help with dialog
#1

Hi all. I have this dialog code. When I test and run it, it have bugs. When I choose any option, system show for me for example TEXT messages, but also showing dialog ( ID 9500 ). How to do, that when I choose any option, system will shows that option, but not dialog? When I delete
Код:
ShowPlayerDialog(playerid,9500,DIALOG_STYLE_LIST, "Intro", "{EBBD63}•{ffffff} One\n{EBBD63}•{ffffff} Two\n{EBBD63}•{ffffff} Three\n{EBBD63}•{ffffff} Lala", "Choose", "");
line, its fine, but I need that line, when player press ESC system will return dialog, not disable it.

Код:
 else if(dialogid==9500)
	{
	    if(response)
	    {
	        if(listitem==0)
	        {
		new msg[1250];
		strcat(msg,"{FFFFFF}TEXT\n\n");
		ShowPlayerDialog(playerid,6971,DIALOG_STYLE_MSGBOX,"Intro",msg,"Back","");
	        }
	        else if(listitem==1)
	        {
               ShowSecIntro(playerid);
	        }
	        else if(listitem==2)
	        {
		ShowThIntro(playerid);
	        }
	        else if(listitem==3)
	        {
 		SendClientMessage(playerid, -1, "{EBBD63}•{ffffff} TEXT");
                SendClientMessage(playerid, -1, "{EBBD63}•{ffffff} TEXT");        
	        }
	        ShowPlayerDialog(playerid,9500,DIALOG_STYLE_LIST, "Intro", "{EBBD63}•{ffffff} One\n{EBBD63}•{ffffff} Two\n{EBBD63}•{ffffff} Three\n{EBBD63}•{ffffff} Lala", "Choose", "");
		}
	}
Reply
#2

What? Explain yourself better
Reply
#3

Quote:
Originally Posted by BrianFaria
Посмотреть сообщение
What? Explain yourself better
That, also remove else before if.
Reply
#4

I need dialog, that shows for me 4 cases. In everyone case ( when I prees ) can see information. When you see main dialog and press ESC button - dialog not closing. If want to close main dialog, must to prees any case.
Reply
#5

pawn Код:
stock hideDialog( playerid )
    return ShowPlayerDialog( playerid, -1, 0, "","", "", "" ), 1;
pawn Код:
if(!response) hideDialog( playerid );
before if(response) if that's what you mean.
Reply
#6

Add else at the end of your condition : if(response) and return the same line where you show the dialog
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)