Respond to another Dialog.
#1

Hello,
I created a Dialog for /weapons.
But Instead I wanna use /locker and it opens a Dialog showing "Weapons" "Clothing" But I dunno how that would work.
I'm not sure how to make it bring up another dialog.
Thanks.
Reply
#2

you have to define the DialogID's.

pawn Код:
define Weapon_Dialog 1
define Other_Dialog 2
//etc.

//then use the switch/case system to call the certain dialogs under OnPlayerDialogResponse.
Reply
#3

So when im doing OnDialogResponse, How do I make it open Dialog 2?

EDIT: Dialog 1 opens "Weapons" "Clothing" Dialog 2 opens "Weapons"
Reply
#4

i cant tell u...
Show me your code please.
Reply
#5

I havent made it.
Also, I made a dialog (/buygun) for a Weapon store, my friend bought a Deagle and it banned him for hacking, help?
Reply
#6

that is caused by ur anti cheat FS.
You have loaded it but didnt adjust ur script to the anti cheat script (i suppose it uses serverside weapons[vars])

You have problems without even have tried smth.?

If you implement a cmd that opens a certain dialog and the same dialog is opened when u enter another command then you propably entered the same dialog to open twice?

Sorry cant do much for u without no code...
Reply
#7

I dont have a Anti-hack FS Lol. Infact I dont have NO FS.

And Dont matter forget the Dialog thing. I need help on that hack thing.
Reply
#8

Ok, I made a command /weapons and it opens a dialog. Well, I want to make a dialog "/locker" and I want to use the "/weapons" Dialog. So I wanna make a dialog pop up when you type /locker and it says "Weapons" "Clothing". When you click on "Weapons" I want the /weapons dialog to respond.. Hope that clears it
Reply
#9

if ur friend is banned by buying an Eagle you must have a kinda anti cheat code on the server.

about dialogs:

pawn Код:
#define Dialog1 1
#define Dialog2 2
//etc.

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case Dialog1:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0://When he clicks on first item
                    {
                        //open then 2nd dialog.
                    }
                    case 1://When he clicks on second item
                    {
                        //open the next dialog.
                    }
                }
            }
        }
        case Dialog2:
        {
            //stuff for the next dialog...
        }
    }
    return 1;
}
Reply
#10

Can I use for example:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case Dialog1:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0://When he clicks on first item
                    {
                        // Can I use here: "ShowPlayerdialog(playerid,  "/weapon dialog id here" ----------);
                    }
                    case 1://When he clicks on second item
                    {
                        //open the next dialog.
                    }
                }
            }
        }
        case "/weapon dialog id here":
        {
            // Stuff here.
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)