Dialog help
#1

guys im making these sets of dialogs which are used to start a deathmatch kind of minigame..

i want help in knowing that how can i put them in series one after another.. as in.. when im finished selecting options in 1 the other comes.. and then the third..

also.. when im done with selecting what all i want from dialogs.. i want all of them to execute together.. not one by one.. but all of them together

SUMMARY :

-DIalog 1

-Dialog 2

-Dialog 3

- ALL DIALOGS output together
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, 1, ...); // create the first dialog at your start minigame command


// OnDialogResponse:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        // what first dialog should do
        ShowPlayerDialog(playerid, 2, ...); // shows dialog 2
    }
    if(dialogid == 2)
    {
        // what second dialog should do
        ShowPlayerDialog(playerid, 3, ...); // show dialog 3
    }
    if(dialogid == 3)
    {
        // what dialog id 3 should do and so on
    }
    return 1;
}
This will help you: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
And this also: https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

alright.. i got how to put them in series..thanks

but now.. when i select option in the dialog wont it execute right then ?? i want all of them to exectue together
Reply
#4

Here is an example:
pawn Код:
new Money[MAX_PLAYERS], Skin[MAX_PLAYERS]; // example

ShowPlayerDialog(playerid, 1, ...); // your command

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {  
        if(response)
        {
            Money[playerid] = 500; // example
            ShowPlayerDialog(playerid, 2, ...); // shows dialog 2
        }
        else
        {
            //
        }
    }
    if(dialogid == 2)
    {
        if(response)
        {
            Skin[playerid] = 23;// example
            ShowPlayerDialog(playerid, 3, ...); // show dialog 3
        }
        else
        {
             //
        }
    }
    if(dialogid == 3)
    {
        if(response)
        {
            GivePlayerMoney(playerid, Money[playerid]); // example
            SetPlayerSkin(playerid, Skin[playerid]); // example
        }
        else
        {
             //
        }
    }
    return 1;
}
Reply
#5

i figured out the logic thanks neways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)