Dialog help
#1

hello
i create one dialog in FilterScript.
But the dialog will not work.
When I put the GameMode worked.
How do I solve the problem?
Thanks
Reply
#2

Show me your code.
Reply
#3

Код:
#include <a_samp>
#include <YSI\y_ini>
#include <zcmd>
#include <sscanf2>
#define DIALOG_komak 13
#define DIALOG_ErtebatBaMa 14
#define DIALOG_DastorHa 15
#define DIALOG_DastorHa_TA 16
#define DIALOG_DastorHa_A1 17
#define DIALOG_DastorHa_A2 18
#define DIALOG_DastorHa_A3 19
#define DIALOG_DastorHa_A4 20
#define DIALOG_DastorHa_A5 21
#define DIALOG_DastorHa_A6 22
CMD:help(playerid, params[])
{
	ShowPlayerDialog(playerid, DIALOG_komak, DIALOG_STYLE_LIST, "Help", "CMDs\nUs", "OK", "No");
	return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_komak)
	{
	    if(response)
		switch(listitem)
		{
		  case 0:
		  {
		  ShowPlayerDialog(playerid, DIALOG_DastorHa, DIALOG_STYLE_LIST, "Commands", "Tozihate Admins\nAdmin Level 1\nAdmin Level 2\nAdmin Level 3\nAdmin Level 4\nAdmin Level 5\nAdmin Level 6", "ok", "");
		  }
		  case 1:
		  {
		  ShowPlayerDialog(playerid, DIALOG_ErtebatBaMa, DIALOG_STYLE_MSGBOX, "Us", "Site: www.no.ir\nTeamSpeak: 00.00.00.00\nEmail: no@gmail.com", "ok", "");
		  }
	    }
    }
    if(dialogid == DIALOG_DastorHa)
	{
	    if(response)
		switch(listitem)
		{
 		case 0:
		{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_TA, DIALOG_STYLE_MSGBOX, "Admins", "AdminLevel 1\nAdminLevel 2\nAdminLevel 3\nAdminLevel 4\nAdminLevel 5\nAdminLevel 6", "ok", "");
	  	}
	  	case 1:
	  	{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_A1, DIALOG_STYLE_MSGBOX, "AL 1", "", "ok", "");
	  	}
	  	case 2:
	  	{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_A2, DIALOG_STYLE_MSGBOX, "AL 2", "", "ok", "");
	  	}
 	 	case 3:
	  	{
          ShowPlayerDialog(playerid, DIALOG_DastorHa_A3, DIALOG_STYLE_MSGBOX, "AL 3", "", "ok", "");
	  	}
	  	case 4:
	  	{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_A4, DIALOG_STYLE_MSGBOX, "AL 4", "", "ok", "");
	  	}
	  	case 5:
	  	{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_A5, DIALOG_STYLE_MSGBOX, "AL 5", "", "ok", "");
	  	}
	  	case 6:
	  	{
	  	ShowPlayerDialog(playerid, DIALOG_DastorHa_A6, DIALOG_STYLE_MSGBOX, "AL 6", "", "ok", "");
 	  }
      }
    }
    return 1;
}
Reply
#4

I find no error, but I think your problem should be here
PHP код:
#define DIALOG_komak 13
#define DIALOG_ErtebatBaMa 14
#define DIALOG_DastorHa 15
#define DIALOG_DastorHa_TA 16
#define DIALOG_DastorHa_A1 17
#define DIALOG_DastorHa_A2 18
#define DIALOG_DastorHa_A3 19
#define DIALOG_DastorHa_A4 20
#define DIALOG_DastorHa_A5 21
#define DIALOG_DastorHa_A6 22 
Most likely there Dialog with these ID just change the ID to 500-600
Reply
#5

ok, thanks for help
Reply
#6

Return 0 instead of 1 at the end of OnDialogResponse callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)