Замена диалоговых окон самп

Обновлено: 19.04.2024

ImGuiFileDialog is a file selection dialog built for (and using only) Dear ImGui.

My primary goal was to have a custom pane with widgets according to file extension. This was not possible using other solutions.

ImGui Supported Version

ImGuiFileDialog follow the master and docking branch of ImGui . currently ImGui 1.88 WIP

  • The library is in Lib_Only branch
  • A demo app can be found the master branch

This library is designed to be dropped into your source code rather than compiled separately.

From your project directory:

These commands create a lib directory where you can store any third-party dependencies used in your project, downloads the ImGuiFileDialog git repository and checks out the Lib_Only branch where the actual library code is located.

Add lib/ImGuiFileDialog/ImGuiFileDialog.cpp to your build system and include lib/ImGuiFileDialog/ImGuiFileDialog.h in your source code. ImGuiFileLib will compile with and be included directly in your executable file.

If, for example, your project uses cmake, look for a line like add_executable(my_project_name main.cpp) and change it to add_executable(my_project_name lib/ImGuiFileDialog/ImGuiFileDialog.cpp main.cpp) . This tells the compiler where to find the source code declared in ImGuiFileDialog.h which you included in your own source code.

You must also, of course, have added Dear ImGui to your project for this to work at all.

dirent v1.23 is required to use ImGuiFileDialog under Windows. It is included in the Lib_Only branch for your convenience.

Android Requirements : Api 21 mini

  • Separate system for call and display
    • Can have many function calls with different parameters for one display function, for example
    • This pane can block the validation of the dialog
    • Can also display different things according to current filter and UserDatas
    • 0 => Infinite
    • 1 => One file (default)
    • n => n files
    • Windows version can list drives

    Singleton Pattern vs. Multiple Instances

    If you only need to display one file dialog at a time, use ImGuiFileDialog's singleton pattern to avoid explicitly declaring an object:

    If you need to have multiple file dialogs open at once, declare each dialog explicity:

    To have a directory chooser, set the file extension filter to nullptr:

    In this mode you can select any directory with one click and open a directory with a double-click.

    Dialog with Custom Pane :

    The signature of the custom pane callback is:

    File Style : Custom icons and colors by extension

    You can define style for files/dirs/links in many ways :

    the style can be colors, icons and fonts

    the general form is :

    ImGuiFileDialog accepts icon font macros as well as text tags for file types.

    ImGuIFontStudio is useful here. I wrote it to make it easy to create custom icon sets for use with Dear ImGui.

    It is inspired by IconFontCppHeaders, which can also be used with ImGuiFileDialog.

    this sample code of master/main.cpp produce the picture above :

    alt text

    You can define a custom filter name that corresponds to a group of filters using this syntax:

    When you select custom_name1, filters 1 to 3 will be applied. The characters < and >are reserved. Don't use them for filter names.

    You can define in OpenDialog/OpenModal call the count file you want to select :

    • 0 => infinite
    • 1 => one file only (default)
    • n => n files only

    See the define at the end of these funcs after path.

    File Dialog Constraints

    You can set the minimum and/or maximum size of the dialog:

    Detail View Mode

    If your version of Dear ImGui has finalized tables support, it will be enabled by default.

    Exploring by keys

    You can also uncomment the next lines to define navigation keys:

    • IGFD_KEY_UP => Up key for explore to the top
    • IGFD_KEY_DOWN => Down key for explore to the bottom
    • IGFD_KEY_ENTER => Enter key for open directory
    • IGFD_KEY_BACKSPACE => BackSpace for comming back to the last directory

    You can also jump to a point in the file list by pressing the corresponding key of the first filename character.

    As you see the current item is flashed by default for 1 second. You can define the flashing lifetime with the function

    You can create/edit/call path bookmarks and load/save them.

    More customization options:

    • You can select each bookmark to edit the displayed name corresponding to a path
    • Double-click on the label to apply the bookmark

    You can also serialize/deserialize bookmarks (for example to load/save from/to a file):

    you can also add/remove bookmark by code :

    and in this case, you can also avoid serialization of code based bookmark

    (please see example code for details)

    Right clicking on any path element button allows the user to manually edit the path from that portion of the tree. Pressing the completion key (GLFW uses enter by default) validates the new path. Pressing the cancel key (GLFW uses escape by default) cancels the manual entry and restores the original path.

    Here's the manual entry operation in action:

    Confirm Overwrite Dialog :

    If you want avoid overwriting files after selection, ImGuiFileDialog can show a dialog to confirm or cancel the operation.

    To do so, define the flag ImGuiFileDialogFlags_ConfirmOverwrite in your call to OpenDialog/OpenModal.

    By default this flag is not set since there is no pre-defined way to define if a dialog will be for Open or Save behavior. (by design! :) )

    Example code For Standard Dialog :

    Example code For Modal Dialog :

    This dialog will only verify the file in the file field, not with GetSelection() .

    The confirmation dialog will be a non-movable modal (input blocking) dialog displayed in the middle of the current ImGuiFileDialog window.

    As usual, you can customize the dialog in your custom config file (CustomImGuiFileDialogConfig.h in this example)

    Uncomment these line for customization options:

    Open / Save dialog Behavior :

    ImGuiFileDialog uses the same code internally for Open and Save dialogs. To distinguish between them access the various data return functions depending on what the dialog is doing.

    When selecting an existing file (for example, a Load or Open dialog), use

    To selecting a new file (for example, a Save As. dialog), use:

    You can now, display thumbnails of pictures.

    The file resize use stb/image so the following files extentions are supported :

    • .jpg (tested sucessfully)
    • .bmp (tested sucessfully)
    • .tga (tested sucessfully)
    • .jpg (tested sucessfully)
    • .jpg (tested sucessfully)
    • .jpg (tested sucessfully_ but not animation just first frame)
    • .psd (not tested)
    • .pic (not tested)
    • .ppm (not tested)
    • .pgm (not tested)

    Corresponding to your backend (ex : OpenGl) you need to define two callbacks :

    • the first is a callback who will be called by ImGuiFileDialog for create the backend texture
    • the second is a callback who will be called by ImGuiFileDialog for destroy the backend texture

    After that you need to call the function who is responsible to create / destroy the textures. this function must be called in your GPU Rendering zone for avoid destroying of used texture. if you do that at the same place of your imgui code, some backend can crash your app, by ex with vulkan.

    This feature is spliited in two zones :

    • CPU Zone : for load/destroy picture file
    • GPU Zone : for load/destroy gpu textures. This modern behavior for avoid destroying of used texture, was needed for vulkan.

    This feature was Successfully tested on my side with Opengl and Vulkan. But im sure is perfectly compatible with other modern apis like DirectX and Metal

    How to Integrate ImGuiFileDialog in your project

    You can customize many aspects of ImGuiFileDialog by overriding ImGuiFileDialogConfig.h .

    To enable your customizations, define the preprocessor directive CUSTOM_IMGUIFILEDIALOG_CONFIG with the path of your custom config file. This path must be relative to the directory where you put the ImGuiFileDialog module.

    This operation is demonstrated in CustomImGuiFileDialog.h in the example project to:

    • Have a custom icon font instead of labels for buttons or message titles
    • Customize the button text (the button call signature must be the same, by the way! :)

    The custom icon font used in the example code (CustomFont.cpp and CustomFont.h) was made with ImGuiFontStudio, which I wrote. :)

    ImGuiFontStudio uses ImGuiFileDialog! Check it out.

    Tune the validations button group

    You can specify :

    • the width of "ok" and "cancel" buttons, by the set the defines "okButtonWidth" and "cancelButtonWidth"
    • the alignement of the button group (left, right, middle, etc..) by set the define "okCancelButtonAlignement"
    • if you want to have the ok button on the left and cancel button on the right or inverted by set the define "invertOkAndCancelButtons"

    just see theses defines in the config file

    with Alignement 0.0 => left

    alignement_0.0.jpg

    with Alignement 1.0 => right

    alignement_1.0.jpg

    with Alignement 0.5 => middle

    alignement_0.5.jpg

    ok and cancel buttons inverted (cancel on the left and ok on the right)

    Embedded in other frames :

    The dialog can be embedded in another user frame than the standard or modal dialog

    You have to create a variable of type ImGuiFileDialog. (if you are suing the singleton, you will not have the possibility to open other dialog)

    Quick Parallel Path Selection in Path Composer

    you have a separator between two directories in the path composer when you click on it you can explore a list of parrallels directories of this point

    Case Insensitive Filtering

    you can use this flag 'ImGuiFileDialogFlags_CaseInsensitiveExtention' when you call the open functions

    this api was sucessfully tested with CImGui

    A C API is available let you include ImGuiFileDialog in your C project. btw, ImGuiFileDialog depend of ImGui and dirent (for windows)

    Sample code with cimgui :

    You need to use cMake. For the 3 Os (Win, Linux, MacOs), the cMake usage is exactly the same,

    cmake -B my_build_directory -DCMAKE_BUILD_TYPE=BuildMode cmake --build my_build_directory --config BuildMode

    Some cMake version need Build mode define via the directive CMAKE_BUILD_TYPE or via --Config when we launch the build. This is why i put the boths possibilities

    By the way you need before, to make sure, you have needed dependencies.

    You need to have the opengl library installed

    You need many lib : (X11, xrandr, xinerama, xcursor, mesa)

    If you are on debian you can run :

    sudo apt-get update sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev

    you need many lib : opengl and cocoa framework

    Thats all folks :-)

    You can check by example in this repo with the file CustomImGuiFileDialogConfig.h :

    Диана Волкова


    Диана Волкова

    Диана Волкова


    Диана Волкова

    Dmitriy Fokuss


    Dmitriy Fokuss ответил Диане

    PERFECT MODS | GTA SAMP

    PERFECT MODS | GTA SAMP запись закреплена

    Можно сампгуи в стиле онеме?

    Аниме не нашел, но нашел наркоманский.

    Андрей Мальцев

    PERFECT MODS | GTA SAMP

    PERFECT MODS | GTA SAMP запись закреплена

    Можно годный сампгуи, и под него курсор? Админку лайк!

    PERFECT MODS | GTA SAMP

    PERFECT MODS | GTA SAMP запись закреплена

    Самп гуи с розовой обводкой переходящий в прозрачную по середке

    Александр Кирзиёнок


    Александр Кирзиёнок

    Галамат Тлеккабылов

    Александр Кирзиёнок


    Александр Кирзиёнок ответил Галамату

    PERFECT MODS | GTA SAMP

    PERFECT MODS | GTA SAMP запись закреплена

    Возвращаемые значения:
    Данная функция не возвращает какого-либо конкретного значения.

    Стили диалога:

    0DIALOG_STYLE_MSGBOXОбычный диалог с 2-мя кнопками
    1DIALOG_STYLE_INPUTДиалог с полем для ввода
    2DIALOG_STYLE_LISTСписок из нескольких элементов
    3DIALOG_STYLE_PASSWORDПозволяет игрокам вводить пароль не раскрывая его

    Упрощение:
    Обычно, чтобы не запоминать цифры и не писать длинное название стилей диалогов, я заменяю их такими макросами:

    Или можно использовать стиля диалогового окна

    Для написания основного текста диалогового окна вы можете использовать нижеприведенную таблицу:

    \bbackspaсe
    \fForm feed
    \nПереход на новую строку
    \rВозврат каретки
    \tТабуляция
    \vВертикальная табуляция
    \'Одиночная кавычка
    \"Двойные кавычки
    \?Вопросительный знак

    Ответ на диалог:
    Мы сделали диалоговое меню, состоящее из 9 пунктов. А нам надо сделать так, чтобы при нажатии на первый пункт, у нас появлялся другой диалог с другой информацией. Для этот мы будем использовать вот такой код:

    Пример диалога с использование условной конструкцией

    Создадим команду с использование ZCMD (командный процессор)

    Креативизация:
    Вы решили создать диалог, а он серы и скучный?
    Мы можем раскрасить наш диалог в любые цвета формата RGB.
    Пример:

    Цвет мы заключаем в фигурную скобку "<" и ">"
    FFFFFF - это белый цвет
    3DB6F2 - светло-голубой
    Думаю цвета вам не доставит большого труда отыскать. Для этого есть множество поисковых система.

    Что же такое этот оператор switch?
    Оператор switch – это оператор выбора. Он удобен в первую очередь тем, что может заменить много условий if, которые проверяют значение одной переменной.
    Пример построения с этим оператором:

    ! Стоить отметить, что в официальной документации к языку написано: ‘In pawn, switch is a structured “if”‘, а это значит, что конструкция switch — это набор структурированных if’ов, отсюда следует, что switch не может работать быстрее if. Но это не всегда так.

    chatinterface(text, label1=0, label2=0, label3=0, label4=0, label5=0, label6=0, label7=0, label8=0, label9=0, label10=0) <
    arr := []
    Loop, parse, text, `n ; парсим текст, чтобы в отдельной строчке каждое действие и клавиша описывались
    <
    arr[A_Index] := A_LoopField
    >
    tnum := 1
    textes := []
    textes[1] := "[CI] AppsButton - отмена"
    Loop 10 < ; вывод информации о клавише и действии, назначенной на неё
    if (arr[A_Index] != "") <
    addMessageToChatWindow2("", "[CE] " . A_Index . " - " . arr[A_Index] . "")
    textesnum := A_Index+1
    textes[textesnum] := "[CE] " . A_Index . " - " . arr[A_Index] . ""
    tnum := tnum+=1
    >
    >
    addMessageToChatWindow2("", "[CI] AppsButton - отмена")
    Loop <
    if (label10 != 0) < ; по количеству заданных лэйблов определяем количество отслеживаемых клавиш (кей 0 = клавиша 0 - лэйбл 10)
    key0 := GetKeyState("vk30", P)
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    key6 := GetKeyState("vk36", P)
    key7 := GetKeyState("vk37", P)
    key8 := GetKeyState("vk38", P)
    key9 := GetKeyState("vk39", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label9 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    key6 := GetKeyState("vk36", P)
    key7 := GetKeyState("vk37", P)
    key8 := GetKeyState("vk38", P)
    key9 := GetKeyState("vk39", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label8 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    key6 := GetKeyState("vk36", P)
    key7 := GetKeyState("vk37", P)
    key8 := GetKeyState("vk38", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label7 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    key6 := GetKeyState("vk36", P)
    key7 := GetKeyState("vk37", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label6 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    key6 := GetKeyState("vk36", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label5 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    key5 := GetKeyState("vk35", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label4 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    key4 := GetKeyState("vk34", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label3 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    key3 := GetKeyState("vk33", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label2 != 0) <
    key1 := GetKeyState("vk31", P)
    key2 := GetKeyState("vk32", P)
    keyCancel := GetKeyState("vk15d", P)
    > else if (label1 != 0) <
    key1 := GetKeyState("vk31", P)
    keyCancel := GetKeyState("vk15d", P)
    > else <
    return, Error
    >
    if (key0 = 1) or (key1 = 1) or (key2 = 1) or (key3 = 1) or (key4 = 1) or (key5 = 1) or (key6 = 1) or (key7 = 1) or (key8 = 1) or (key9 = 1) or (key10 = 1) or (keyCancel = 1) < ; если какая-то клавиша нажалась - сразу начинаем удаление всех созданных в начале строчек
    rnum := 0
    ind := 0
    re1 := " " . textes[1] . ""
    re2 := " " . textes[2] . ""
    re3 := " " . textes[3] . ""
    re4 := " " . textes[4] . ""
    re5 := " " . textes[5] . ""
    re6 := " " . textes[6] . ""
    re7 := " " . textes[7] . ""
    re8 := " " . textes[8] . ""
    re9 := " " . textes[9] . ""
    re10 := " " . textes[10] . ""
    re11 := " " . textes[11] . ""

    Loop 100 if (rnum = tnum) break
    >

    GetChatLine(ind, var)
    if (var = re1) or (var = re2) or (var = re3) or (var = re4) or (var = re5) or (var = re6) or (var = re7) or (var = re8) or (var = re9) or (var = re10) or (var = re11) removeChatLine(ind)
    rnum := rnum+=1
    > else ind := ind+=1
    >

    if (key1 = 1) gosub, %label1%
    break
    >

    if (key2 = 1) gosub, %label2%
    break
    >

    if (key3 = 1) gosub, %label3%
    break
    >

    if (key4 = 1) gosub, %label4%
    break
    >

    if (key5 = 1) gosub, %label5%
    break
    >

    if (key6 = 1) gosub, %label6%
    break
    >

    if (key7 = 1) gosub, %label7%
    break
    >

    if (key8 = 1) gosub, %label8%
    break
    >

    if (key9 = 1) gosub, %label9%
    break
    >

    if (keyCancel = 1) addMessageToChatWindow2("", "[CI] Отменено.")
    return
    >
    >
    >
    return
    >

    F1::
    chatinterface("действие 1`nдействие 2`nдействие 3", 1, 2, 3, 4)
    return

    1:
    addmessagetochatwindow2("", "[AHK] Вы выполнили действие 1")
    return

    2:
    addmessagetochatwindow2("", "[AHK] Вы выполнили действие 2")
    return

    3:
    addmessagetochatwindow2("", "[AHK] Вы выполнили действие 3")
    return







    Сейчас пройдёмся по каждому подробно:
    DIALOG_STYLE_LIST - диалог для вывода списка нужных функций или команд.
    Ко всем командам:
    Для DC_CMD:


    CMD:dialog(playerid)
    ShowPlayerDialog(playerid,555,DIALOG_STYLE_LIST,"Пример диалога","Содержимое списка 1\nСодержимое списка 2\nСодержимое списка 3","Кнопка 1","Кнопка 2");
    return 1;
    >

    if(strcmp(cmd, "/test", true) == 0)
    ShowPlayerDialog(playerid, 8007, DIALOG_STYLE_LIST, "Пример диалога","Содержимое списка 1\nСодержимое списка 2\nСодержимое списка 3","Кнопка 1","Кнопка 2");
    return 1;
    >

    <
    if(dialogid == 555)
    <
    if(response)
    <
    if(listitem == 0) return SendClientMessage(playerid,0x88AA88AA,"Вы нажали на кнопку 'Содержимое списка 1'");
    if(listitem == 1) return SendClientMessage(playerid,0x88AA88AA,"Вы нажали на кнопку 'Содержимое списка 2'");
    if(listitem == 2) return SendClientMessage(playerid,0x88AA88AA,"Вы нажали на кнопку 'Содержимое списка 3'");

    >
    else
    SendClientMessage(playerid,0x88AA88AA,"Вы нажали на 'Кнопка 2' либо Esc");
    return 1;
    >
    >
    return 1;
    >



    Выглядит данный диалог таким образом:

    Идём дальше. DIALOG_STYLE_MSGBOX - данный диалог используется для красивого вывода информации,дабы не создавать лишний флуд в чат игроку.
    Ко всем командам:
    Для DC_CMD:

    CMD:dialog1(playerid)
    ShowPlayerDialog(playerid,556,DIALOG_STYLE_MSGBOX,"Пример диалога","Содержимое(текст)","Кнопка 1","Кнопка 2");
    return 1;
    >


    f(strcmp(cmd, "/test", true) == 0)
    ShowPlayerDialog(playerid, 556 , DIALOG_STYLE_MSGBOX, "Пример диалога", "Содержимое(текст)", "Кнопка1", "Кнопка2");
    return 1;
    >


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    if(dialogid == 556)
    if(response)
    SendClientMessage(playerid,0x88AA88AA,"Вы нажали на 'Кнопка 1' либо Enter");
    return 1;
    >
    else
    SendClientMessage(playerid,0x88AA88AA,"Вы нажали на 'Кнопка 2' либо Esc");
    return 1;
    >
    >
    return 1;
    >



    Данный диалог выглядит таким образом:

    DIALOG_STYLE_INPUT и DIALOG_STYLE_PASSWORD одинаковы по своей сути. Отличаются они тем,что DIALOG_STYLE_PASSWORD - скрывает вводимые символы в диалоговое окно,вместо набранного текста появятся звёздочки,а DIALOG_STYLE_INPUT - не скрывает вводимые вами символы.
    Ко всем командам:
    Для DC_CMD:

    CMD:dialog2(playerid)
    ShowPlayerDialog(playerid,557,DIALOG_STYLE_INPUT,"Пример диалога","Содержимое(текст)","Кнопка 1","Кнопка 2");
    return 1;
    >

    if(strcmp(cmd, "/test", true) == 0)
    ShowPlayerDialog(playerid,558,DIALOG_STYLE_INPUT,"Пример диалога","Содержимое(текст)","Кнопка1","Кнопка2");
    return 1;
    >

    if(dialogid == 557)
    if(response)
    new str[100]; format(str,sizeof(str),"Вы ввели: %s",inputtext);
    SendClientMessage(playerid,0x88AA88AA,str);
    return 1;
    >
    else
    SendClientMessage(playerid,0x88AA88AA,"Вы нажали на 'Кнопка 2' либо Esc");
    return 1;
    >
    >
    return 1;
    >


    Выглядит данный диалог таким образом:

    Диалоги которые ввели в 0.3.7 версии
    В новой версии SA:MP были введены два новых видов диалогов а именно:


    DIALOG_STYLE_TABLIST - данный диалог зачастую используется на различных серверах при покупке чего либо,где указано название,цену и количество которое продастся вам.
    Ко всем командам:
    Для DC_CMD:

    CMD:dialog5(playerid)
    ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_TABLIST, "Покупка оружия",
    "Дигл\t$5000\t100\n\ Дробовик\t$5000\n100\n\ Пистолет\t$1000\t50", // и т. д.
    "Выбрать", "Отмена");
    >

    if(strcmp(cmd, "/test", true) == 0)
    ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_TABLIST, "Покупка оружия",
    "Дигл\t$5000\t100\n\ Дробовик\t$5000\n100\n\ Пистолет\t$1000\t50", // и т. д.
    "Выбрать", "Отмена");
    >



    Выглядит данный диалог таким образом:

    DIALOG_STYLE_TABLIST_HEADERS: - выглядит так-же как и предыдущий тип диалога,но в этом диалоге вы можете указать название чего-либо над диалоговым окном.
    Ко всем командам:
    Для DC_CMD:

    CMD:dialog6(playerid)
    ShowPlayerDialog(playerid, 777, DIALOG_STYLE_TABLIST_HEADERS, "Покупка оружия",
    "Оружие\tЦена\tпатроны\n\ Дигл\t$5000\t100\n\ Дробовик\t$5000\t100\n\ Пистолет\t$1000\t50", // и т. д.
    "Выбрать", "Отмена");
    >

    if(strcmp(cmd, "/test", true) == 0)
    ShowPlayerDialog(playerid, 777, DIALOG_STYLE_TABLIST_HEADERS, "Покупка оружия",
    "Оружие\tЦена\tпатроны\n\ Дигл\t$5000\t100\n\ Дробовик\t$5000\t100\n\ Пистолет\t$1000\t50", // и т. д.
    "Выбрать", "Отмена");
    >


    Выглядит данный диалог таким образом:

    Теперь объясню некоторые вещи:
    \n - значит перенос строки;
    \t - табуляция;
    777 - id диалога.
    Так-же у вас в моде может вместо

    Читайте также: