Помогите с скриптом

Bondy228

Потрачен
Автор темы
15
1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R2
  3. 0.3.7-R3
  4. 0.3.7-R4
Вообщем, нужно сделать код подтверждения скрипта при первой активации, код вводится в диалог в виде пароля, но при попытке использовать введенный текст в input, ничего не выходит, помогите, как правильно сделать, в сообщении также текст введенный не выводится.
чо:
if isKeyJustPressed(VK_B) and not mozno and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
            sampShowDialog(1, "{ff0000}Введите код подтверждения", "Введите текст", "ОК", "", DIALOG_STYLE_PASSWORD)
            while sampIsDialogActive(1) do wait(100) end
            local result, button, _, input = sampHasDialogRespond(1)
            sampAddChatMessage(string.format("вы ввели "..input, 0x40FF40))
            if input == 615710 then
                mozno = true
            end
        end
        if isKeyJustPressed(VK_B) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() and mozno then
            main_window_state = not main_window_state
        end
        imgui.Process = main_window_state
    end
end
 
Последнее редактирование:

Sanchez.

Известный
704
187
Вообщем, нужно сделать код подтверждения скрипта при первой активации, код вводится в диалог в виде пароля, но при попытке использовать введенный текст в input, ничего не выходит, помогите, как правильно сделать
чо:
if isKeyJustPressed(VK_B) and not mozno and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
            sampShowDialog(1, "{ff0000}Введите код подтверждения", "Введите текст", "ОК", "", DIALOG_STYLE_PASSWORD)
            while sampIsDialogActive(1) do wait(100) end
            local result, button, _, input = sampHasDialogRespond(1)
            sampAddChatMessage(string.format("вы ввели "..input, 0x40FF40))
            if input == 615710 then
                mozno = true
            end
        end
        if isKeyJustPressed(VK_B) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() and mozno then
            main_window_state = not main_window_state
        end
        imgui.Process = main_window_state
    end
end
возьми число 615710 в кавычки (там, где проверка на input)
 

Bondy228

Потрачен
Автор темы
15
1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

Sidney31

Известный
1,132
385
Lua:
        if isKeyDown(0x42) and not mozno and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
            sampShowDialog(100, "{ff0000}Введите код подтверждения", "Введите текст", "ОК", "", 3)
            while sampIsDialogActive(100) do wait(100) end
            local result, button, _, input = sampHasDialogRespond(100)
            sampAddChatMessage("вы ввели "..input, -1)
            if input == '615710' then
                mozno = true
                print(yes)
            end
        end
        if isKeyDown(0x42) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() and mozno then
            main_window_state = not main_window_state
        end
 

Bondy228

Потрачен
Автор темы
15
1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
        if isKeyDown(0x42) and not mozno and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
            sampShowDialog(100, "{ff0000}Введите код подтверждения", "Введите текст", "ОК", "", 3)
            while sampIsDialogActive(100) do wait(100) end
            local result, button, _, input = sampHasDialogRespond(100)
            sampAddChatMessage("вы ввели "..input, -1)
            if input == '615710' then
                mozno = true
                print(yes)
            end
        end
        if isKeyDown(0x42) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() and mozno then
            main_window_state = not main_window_state
        end
спасибо