ShowPlayerDialog with no response?
#1

Hello!

I wrote one filterscript for commands with dialogs. All was good, until I decide to make input dialog. When I clicked on any item on the list, the dialog just hide with no response.

Code:
#include <a_samp>

#define COLOR_RED 0xFF0000FF

#define DIALOG_CMDS_1 3
#define DIALOG_CMDS_2 4

public OnFilterScriptInit()
{
	print("Filterscript: COMMANDS");
	
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])
{
	if (strcmp("/cmds",cmdtext,true) == 0)
	{
	  ShowPlayerDialog(playerid,DIALOG_CMDS_1,DIALOG_STYLE_LIST,"CrazyStunts Commands","\nRegister On Server\nLogin Into Server\nSend Private Message","Select","Cancel");
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
	if(dialogid == DIALOG_CMDS_1)
	{
	  if(response)
	  {
	    switch(listitem)
	    {
				case 0: ShowPlayerDialog(playerid,DIALOG_CMDS_2,DIALOG_STYLE_INPUT,"CrazyStunts Commands","Please write a password.","Register","Cancel");
			}
		}
	}
	return 1;
}
Did I write anything wrong? Please help.
Reply


Messages In This Thread
ShowPlayerDialog with no response? - by MummyKillerSLO - 02.02.2010, 14:14
Re: ShowPlayerDialog with no response? - by MummyKillerSLO - 02.02.2010, 17:18
Re: ShowPlayerDialog with no response? - by hardstop - 02.02.2010, 17:51
Re: ShowPlayerDialog with no response? - by LuxurioN™ - 02.02.2010, 18:00

Forum Jump:


Users browsing this thread: 1 Guest(s)