Помощь по скрипту

nnplayer

Известный
Автор темы
30
5
Вот код
if text:find("Вы подняли трубку") then
lua_thread.create(function()
wait(1000)
local modelId = getCharModel(PLAYER_PED)
local messages = {}

if modelId == 57 then
for i = 1, 6 do
if settings.elements.auto_reply_skin57.v ~= "" then
table.insert(messages, settings.elements.auto_reply_skin57.v)
end
end
else
for i = 1, 6 do
if settings.elements.auto_reply_other.v ~= "" then
table.insert(messages, settings.elements.auto_reply_other.v)
end
end
end

run_auto_reply(messages)
end)


local function run_auto_reply(lines)
while sampIsChatInputActive() or sampIsDialogActive() do
wait(50)
end
for _, line in ipairs(lines) do
if not line or not line:match("%S") then break end
while sampIsChatInputActive() or sampIsDialogActive() do
wait(50)
end
local converted = to_cp1251(line)
if converted ~= "" then
sampSendChat(converted) <----------------------------------------------------------------------------
end
wait(settings.elements.auto_reply_delay.v)
end
end


local function render_auto_reply_tab()
imgui.Text(u8"Настройка АвтоОтветчика:")
imgui.Separator()
imgui.TextWrapped(u8"Строки для скина 57 (адвокат):")
for i = 1, 6 do
imgui.Text(u8"Строка " .. i .. ":")
if imgui.InputText("##skin57_" .. i, settings.elements.auto_reply_skin57) then
save_config()
end
end
imgui.Spacing()
imgui.TextWrapped(u8"Строки для остальных скинов:")
for i = 1, 6 do
imgui.Text(u8"Строка " .. i .. ":")
if imgui.InputText("##other_" .. i, settings.elements.auto_reply_other) then
save_config()
end
end
imgui.Spacing()
imgui.Text(u8"Задержка между строками (мс):")
if imgui.InputInt("##auto_reply_delay", settings.elements.auto_reply_delay) then
settings.elements.auto_reply_delay.v = math.max(0, settings.elements.auto_reply_delay.v)
save_config()
end
end


Я не знаю как вы тут разберётесь, но я мега тупой и не могу сам разобраться как вывести нормальную кириллицу :( помогите

Я заебался сам пытаться и прогнал через нейронку, ничего не получилось :(