Dialog help
#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


Messages In This Thread
Dialog help - by spd_sahil - 09.09.2011, 16:54
Re: Dialog help - by Jafet_Macario - 09.09.2011, 17:07
Re: Dialog help - by spd_sahil - 09.09.2011, 17:09
Re: Dialog help - by Jafet_Macario - 09.09.2011, 18:07
Re: Dialog help - by spd_sahil - 09.09.2011, 19:01

Forum Jump:


Users browsing this thread: 1 Guest(s)