Dialog problem[REP+]
#4

I made a DIALOG you can check out here.
And look what's wrong on your dialog.

pawn Код:
#define DIALOG_BUYTOYS   23786

ShowPlayerDialog(playerid, DIALOG_BUYTOYS, DIALOG_STYLE_LIST, "BUYTOYS", "Toy1\nToy2\nToy3\nToy4\nToy5", "Buy", "Cancel");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_BUYTOYS){
        if(response){
            switch(listitem)){
                case 0:
                {
                    //Selected Item: "Toy1"
                }
                case 1:
                {
                    //Selected Item: "Toy2"
                }
                case 2:
                {
                    //Selected Item: "Toy3"
                }
                case 3:
                {
                    //Selected Item: "Toy4"
                }
                case 4:
                {
                    //Selected Item: "Toy5"
                }
            }
        }
        else{
            //The player has pressed "Buy".
            switch(listitem{
                case 0:
                {
                    //Selected Item: "Toy1"
                }
                case 1:
                {
                    //Selected Item: "Toy2"
                }
                case 2:
                {
                    //Selected Item: "Toy3"
                }
                case 3:
                {
                    //Selected Item: "Toy4"
                }
                case 4:
                {
                    //Selected Item: "Toy5"
                }
            }
        }
    }
    return 0;
}
Reply


Messages In This Thread
Dialog problem[REP+] - by Strech - 22.08.2012, 07:11
Re: Dialog problem[REP+] - by ThePhenix - 22.08.2012, 07:14
Re: Dialog problem[REP+] - by newbienoob - 22.08.2012, 07:14
Re: Dialog problem[REP+] - by ThePhenix - 22.08.2012, 07:23
Re: Dialog problem[REP+] - by HuSs3n - 22.08.2012, 07:44

Forum Jump:


Users browsing this thread: 3 Guest(s)