How to create new dialog response?
#9

pawn Код:
public OnDialogResponse ( playerid, dialogid, response, listitem, inputtext [] )
{
    switch ( dialogid )
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "Sa ei ostnud midagi.");
                return 1; // ...
            }

            switch(listitem)
            {
                case 0: // Items
                {
                    if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xAFAFAFAA, "Sul pole piisavalt raha taskus ning kahjuks kaardiga tasuda ei saa!");
                    GivePlayerMoney(playerid,-10);
                    SendClientMessage(playerid,0xAFAFAFAA, " Sa ostsid endale 1 paki Tere piima, mis maksis 10 LSUD'd. ");
                   
                }
                case 1:
                {
                    if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xAFAFAFAA, "Sul pole piisavalt raha taskus ning kahjuks kaardiga tasuda ei saa!");
                    GivePlayerMoney(playerid,-5);
                    SendClientMessage(playerid,0xAFAFAFAA, " Sa ostsid endale 1 paki Sддstu makarone, mis maksis 5 LSUD'd. ");
                }
                // Add the rest of your listitems for dialog 1 here

            }

        }
        case 2:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "Sa ei ostnud midagi.");
                return 1; // ...
            }

            switch(listitem)
            {
                case 0: // Items
                {
                    if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xAFAFAFAA, "Sul pole piisavalt raha taskus ning kahjuks kaardiga tasuda ei saa!");
                    GivePlayerMoney(playerid,-10);
                    SendClientMessage(playerid,0xAFAFAFAA, " Sa ostsid endale 1 paki Tere piima, mis maksis 10 LSUD'd. ");
                   
                }
                case 1:
                {
                    if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xAFAFAFAA, "Sul pole piisavalt raha taskus ning kahjuks kaardiga tasuda ei saa!");
                    GivePlayerMoney(playerid,-5);
                    SendClientMessage(playerid,0xAFAFAFAA, " Sa ostsid endale 1 paki Sддstu makarone, mis maksis 5 LSUD'd. ");
                }
                // Add the rest of your listitems for dialog 2 here

            }

        }
        // Add the rest of your dialogs here
    }
    return 0; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
}
Reply


Messages In This Thread
How to create new dialog response? - by Kukkurloom - 01.05.2012, 16:02
Re: How to create new dialog response? - by TzAkS. - 01.05.2012, 16:07
Re: How to create new dialog response? - by Kukkurloom - 01.05.2012, 16:41
Re: How to create new dialog response? - by Carbonite - 01.05.2012, 16:44
Re: How to create new dialog response? - by Kukkurloom - 01.05.2012, 17:55
Re: How to create new dialog response? - by FL1K3R - 01.05.2012, 18:26
Re: How to create new dialog response? - by Kukkurloom - 01.05.2012, 18:48
Re: How to create new dialog response? - by Kukkurloom - 02.05.2012, 11:32
Re: How to create new dialog response? - by MadeMan - 02.05.2012, 12:17
Re: How to create new dialog response? - by Kukkurloom - 02.05.2012, 12:31

Forum Jump:


Users browsing this thread: 1 Guest(s)