29.05.2018, 18:25
So I want Attach and Deattach to display a message after clicking
The whole process goes like this /help -> Suppression System -> Attach -> Display Message
I get errors like OnDialogResponse should show a value and that SendClientMessage is already a defined symbol
The whole process goes like this /help -> Suppression System -> Attach -> Display Message
I get errors like OnDialogResponse should show a value and that SendClientMessage is already a defined symbol
pawn Код:
#define DIALOG_SUPPRESSION 1
pawn Код:
CMD:help(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_SUPPRESSION, DIALOG_STYLE_LIST, "Commands", "Suppression System", "Continue", "Cancel");
return 1;
}
pawn Код:
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;
}