Вопросы по Lua скриптингу

Общая тема для вопросов по разработке скриптов на языке программирования Lua, в частности под MoonLoader.
  • Задавая вопрос, убедитесь, что его нет в списке частых вопросов и что на него ещё не отвечали (воспользуйтесь поиском).
  • Поищите ответ в теме посвященной разработке Lua скриптов в MoonLoader
  • Отвечая, убедитесь, что ваш ответ корректен.
  • Старайтесь как можно точнее выразить мысль, а если проблема связана с кодом, то обязательно прикрепите его к сообщению, используя блок [code=lua]здесь мог бы быть ваш код[/code].
  • Если вопрос связан с MoonLoader-ом первым делом желательно поискать решение на wiki.

Частые вопросы

Как научиться писать скрипты? С чего начать?
Информация - Гайд - Всё о Lua скриптинге для MoonLoader(https://blast.hk/threads/22707/)
Как вывести текст на русском? Вместо русского текста у меня какие-то каракули.
Изменить кодировку файла скрипта на Windows-1251. В Atom: комбинация клавиш Ctrl+Shift+U, в Notepad++: меню Кодировки -> Кодировки -> Кириллица -> Windows-1251.
Как получить транспорт, в котором сидит игрок?
Lua:
local veh = storeCarCharIsInNoSave(PLAYER_PED)
Как получить свой id или id другого игрока?
Lua:
local _, id = sampGetPlayerIdByCharHandle(PLAYER_PED) -- получить свой ид
local _, id = sampGetPlayerIdByCharHandle(ped) -- получить ид другого игрока. ped - это хендл персонажа
Как проверить, что строка содержит какой-то текст?
Lua:
if string.find(str, 'текст', 1, true) then
-- строка str содержит "текст"
end
Как эмулировать нажатие игровой клавиши?
Lua:
local game_keys = require 'game.keys' -- где-нибудь в начале скрипта вне функции main

setGameKeyState(game_keys.player.FIREWEAPON, -1) -- будет сэмулировано нажатие клавиши атаки
Все иды клавиш находятся в файле moonloader/lib/game/keys.lua.
Подробнее о функции setGameKeyState здесь: lua - setgamekeystate | BlastHack — DEV_WIKI(https://www.blast.hk/wiki/lua:setgamekeystate)
Как получить id другого игрока, в которого целюсь я?
Lua:
local valid, ped = getCharPlayerIsTargeting(PLAYER_HANDLE) -- получить хендл персонажа, в которого целится игрок
if valid and doesCharExist(ped) then -- если цель есть и персонаж существует
  local result, id = sampGetPlayerIdByCharHandle(ped) -- получить samp-ид игрока по хендлу персонажа
  if result then -- проверить, прошло ли получение ида успешно
    -- здесь любые действия с полученным идом игрока
  end
end
Как зарегистрировать команду чата SAMP?
Lua:
-- До бесконечного цикла/задержки
sampRegisterChatCommand("mycommand", function (param)
     -- param будет содержать весь текст введенный после команды, чтобы разделить его на аргументы используйте string.match()
    sampAddChatMessage("MyCMD", -1)
end)
Крашит игру при вызове sampSendChat. Как это исправить?
Это происходит из-за бага в SAMPFUNCS, когда производится попытка отправки пакета определенными функциями изнутри события исходящих RPC и пакетов. Исправления для этого бага нет, но есть способ не провоцировать его. Вызов sampSendChat изнутри обработчика исходящих RPC/пакетов нужно обернуть в скриптовый поток с нулевой задержкой:
Lua:
function onSendRpc(id)
  -- крашит:
  -- sampSendChat('Send RPC: ' .. id)

  -- норм:
  lua_thread.create(function()
    wait(0)
    sampSendChat('Send RPC: ' .. id)
  end)
end
 
Последнее редактирование:

Kalgon

Новичок
9
1
Как сделать, что-бы через каждый промежуток времени(допусти 10 минут) производился код?
 

Vespan

Чешский луашер
Проверенный
2,120
1,721
Появляеться текст,проходит пару секунд и текст из .txt файла изчезает

Lua:
                        local config = io.open('moonloader/Admin Tools/Логирование Наказаний.txt', 'r')
                            if config then
                                for line in config:lines() do
                                    imgui.Text(u8(line))
                                end
                            end
 

Fabregoo

Известный
656
128
Как изменить строку premium на тест?или нельзя?
42570
 

Vespan

Чешский луашер
Проверенный
2,120
1,721
gsub("текст который надо заменить", "текст на замену")
всё
 

Fabregoo

Известный
656
128
Что зааа
Скрипт работает, все идет ноо...
Лог
Код:
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already ex
 

Dmitriy Makarov

25.05.2021
Проверенный
2,500
1,131
Что зааа
Скрипт работает, все идет ноо...
Лог
Код:
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already ex
В двух скриптах одинаковые команды зарегал вроде
 
  • Нравится
Реакции: Fabregoo

dmitri4

Известный
453
79
Что зааа
Скрипт работает, все идет ноо...
Лог
Код:
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already exists.
RegisterCommand Error: Command "jl" already exists.
RegisterCommand Error: Command "t" already exists.
RegisterCommand Error: Command "bb" already exists.
RegisterCommand Error: Command "sm" already exists.
RegisterCommand Error: Command "ph" already exists.
RegisterCommand Error: Command "info" already exists.
RegisterCommand Error: Command "help1" already exists.
RegisterCommand Error: Command "help2" already exists.
RegisterCommand Error: Command "vbiz" already exists.
RegisterCommand Error: Command "fbiz" already exists.
RegisterCommand Error: Command "fh" already exists.
RegisterCommand Error: Command "guns" already exists.
RegisterCommand Error: Command "drugss" already exists.
RegisterCommand Error: Command "med" already exists.
RegisterCommand Error: Command "arm" already exists.
RegisterCommand Error: Command "l" already exists.
RegisterCommand Error: Command "k" already exists.
RegisterCommand Error: Command "finv" already exists.
RegisterCommand Error: Command "funv" already exists.
RegisterCommand Error: Command "fmute" already ex
Убери регистрацию команд с бесконечного цикла 🤦‍♂️
 
  • Нравится
Реакции: Fabregoo

kingleonides

Участник
43
28
Как взаимодействовать с кнопками диалога?
Конкретно интересует нажатие на определенную кнопку, получения кол-ва кнопок, получения текста этих кнопок.
 

Carlos777

Потрачен
227
219
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Не работает ESC, после закрытия three_gui.v

Lua:
function threego(arg)
  three_gui.v = not three_gui.v
  imgui.Process = not imgui.Process
end

drawframe

 if main_gui.v then
    imgui.ShowCursor = true
  elseif two_gui.v or three_gui.v then
    imgui.ShowCursor = false
  end