#define DIALOG_SUPPRESSION 1
CMD:help(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_SUPPRESSION, DIALOG_STYLE_LIST, "Commands", "Suppression System", "Continue", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_SUPPRESSION)
{
if(response)
{
ShowPlayerDialog(playerid, DIALOG_SUPPRESSION, DIALOG_STYLE_LIST, "Commands", "Attach\nDeattach", "Continue", "Cancel");
}
return 1;
}}
if(dialogid == DIALOG_SUPPRESSION)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, COLOR_AQUA, "TEST");
}
if(listitem == 1)
{
SendClientMessage(playerid, COLOR_AQUA, "TEEEEST");
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_SUPPRESSION)
{
if(response)
{
ShowPlayerDialog(playerid, DIALOG_SUPPRESSION, DIALOG_STYLE_LIST, "Commands", "Attach\nDeattach", "Continue", "Cancel");
}
}
if(dialogid == DIALOG_SUPPRESSION)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, COLOR_AQUA, "TEST");
}
if(listitem == 1)
{
SendClientMessage(playerid, COLOR_AQUA, "TEEEEST");
}
}
}
return 1;
}
Try this now:
PHP код:
|
#define DIALOG_HELP 0
#define DIALOG_SUPPRESSION_HELP 1
CMD:help(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "Commands", "Suppressor\nSome shit", "Continue", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_HELP:
{
if(response)
return ShowPlayerDialog(playerid, DIALOG_SUPPRESSION_HELP, DIALOG_STYLE_LIST, "Commands", "Attach\nDettach", "Yes", "Exit");
}
case DIALOG_SUPPRESSION_HELP:
{
if(response)
{
switch(listitem)
{
case 0:
return SendClientMessage(playerid, -1, "Attach");
case 1:
return SendClientMessage(playerid, -1, "Dettach");
}
}
else
return ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "Commands", "Suppressor\nSome shit", "Continue", "Cancel");
}
}
return 1;
}