02.02.2010, 14:14
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.
Did I write anything wrong? Please help.
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;
}


?