Dialog listing(categories)
#1

Hi everyone, im sitting here with one problem, when i make dialog(gun menu etc) then how do i make categories? like for guns i want to make shotguns, SMG's etc, how do i make it?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=251474
Reply
#3

Quote:
Originally Posted by fadhilkab
Посмотреть сообщение
there is not shown how to make categories
Reply
#4

ShowPlayerDialog(playerid, dialogid, style, "Dialog Title", "Category 1\nCategory 2\nCategory 3","Okay","Exit");

Use '\n' to separate categories, Category 1 becomes case 0. Category 2 becomes case 1. Category 3 becomes case 2. So when you call OnDialogResponse, use case to define categories.
Example:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == dialogid) //If they responded to our dialog
    {
        if(response) // If they pressed the Okay button.
        {
            switch(listitem) //Start using list items, like Category 1, 2, 3 etc.
            {
                case 0: //If they chose Category 1
                {
                    //Do something here.
                }
                case 1: //If they chose Category 2
//Code Continues...
Reply
#5

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
ShowPlayerDialog(playerid, dialogid, style, "Dialog Title", "Category 1\nCategory 2\nCategory 3","Okay","Exit");

Use '\n' to separate categories, Category 1 becomes case 0. Category 2 becomes case 1. Category 3 becomes case 2. So when you call OnDialogResponse, use case to define categories.
Example:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == dialogid) //If they responded to our dialog
    {
        if(response) // If they pressed the Okay button.
        {
            switch(listitem) //Start using list items, like Category 1, 2, 3 etc.
            {
                case 0: //If they chose Category 1
                {
                    //Do something here.
                }
                case 1: //If they chose Category 2
//Code Continues...
Thanks
Reply
#6

I want to make catagories say i.e dance , rock , classic rock but then within them catagories there a list items to choose from how would I do that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)