01.09.2016, 11:31
PHP код:
#include <a_samp>
#define DIALOG_1 1
#define DIALOG_2 2
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/test", cmdtext, true, 5) == 0)
{
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Jake", "Jake Hero", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_1:
{
if(response) // This is select
{
switch(listitem)
{
// Jake Hero
case 0: ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, "Test #1", "Test\nTest\nTest", "Back", "Cancel");
}
}
}
case DIALOG_2:
{
if(response) // This is back
{
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Jake", "Jake Hero\nBill Cipher\nHarley Quinn", "Select", "Cancel");
}
else if(!response) // This is close
{
// do whatever you want here
}
}
}
return 1;
}

