Dialog problem
#4

pawn Код:
command(attach, playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "Attach toys", "Briefcase\nFire Hydrant\nGas Pump\nWooden Crate\nSmall Buolder\nBBQ Grill\nBeer\nTelevision", "Select", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, WHITE, "You cancelled.");
                return 1;
            }

            switch(listitem)
            {
                case 0:
                {
                    AttachObjectToPlayer(1210, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 1:
                {
                    AttachObjectToPlayer(1211, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 2:
                {
                    AttachObjectToPlayer(1244, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 3:
                {
                    AttachObjectToPlayer(1271, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 4:
                {
                    AttachObjectToPlayer(1304, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 5:
                {
                    AttachObjectToPlayer(1481, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 6:
                {
                    AttachObjectToPlayer(1484, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }
                case 7:
                {
                    AttachObjectToPlayer(1518, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
                }

            }

        }
    }
    return 0;
}
Try this.

And the return 1; error makes no sense, is there a random other end bracket that would prevent the thing from continuing, or something?

EDIT: If the DIALOG_TOYS define thing doesn't work, are you sure that there is no other dialog id with the id of 1?
Reply


Messages In This Thread
Dialog problem - by Deanol1099 - 27.06.2012, 03:34
Re : Dialog problem - by Kindred - 27.06.2012, 03:40
Re: Re : Dialog problem - by Deanol1099 - 27.06.2012, 03:50
Re: Dialog problem - by Kindred - 27.06.2012, 03:55
Re: Dialog problem - by Deanol1099 - 27.06.2012, 04:02

Forum Jump:


Users browsing this thread: 3 Guest(s)