Please help me with dialogs.
#6

Here's an example:

pawn Код:
#define DIALOG_DUTY 10
#define DIALOG_CLOTHES 11
pawn Код:
ShowDialog(playerid, dialogid)
{
    switch(dialogid)
    {
        case DIALOG_DUTY:
        {
            ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Duty", "Duty\nClothes\nWeapons\nUndercover", "Select", "Cancel");
        }
        case DIALOG_CLOTHES:
        {
            ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Clothes", "Nice Clothes\nGood Clothes\nAwesome Clothes", "Select", "Cancel");
        }
    }
}
in /duty command
pawn Код:
ShowDialog(playerid, DIALOG_DUTY);
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_DUTY)
    {
        if(response)
        {
            switch(listitem)
            {
            case 0: // when player chooses "Duty"
            case 1: ShowDialog(playerid, DIALOG_CLOTHES);
            case 2: // when player chooses "Weapons"
            case 3: // when player chooses "Undercover"
            }
        }
        return 1;
    }
    if(dialogid == DIALOG_CLOTHES)
    {
        if(response)
        {
            switch(listitem)
            {
            case 0: // when player chooses "Nice Clothes"
            case 1: // when player chooses "Good Clothes"
            case 2: // when player chooses "Awesome Clothes"
            }
        }
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Please help me with dialogs. - by Azzeto - 22.07.2011, 09:56
Re: Please help me with dialogs. - by Harry_Sandhu - 22.07.2011, 10:07
Re: Please help me with dialogs. - by MadeMan - 22.07.2011, 10:08
AW: Please help me with dialogs. - by Gomma - 22.07.2011, 10:14
Re: Please help me with dialogs. - by Azzeto - 22.07.2011, 10:15
Re: Please help me with dialogs. - by MadeMan - 22.07.2011, 10:34

Forum Jump:


Users browsing this thread: 2 Guest(s)