не работает u8

Infinqxw

Новичок
Автор темы
27
1
Помогите, при в ходе в игру должно писать Успешно запущен, а пишет неизвестные иероглифы


12312:
function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage(u8"[Tools] Успешно запущен.", -1)
    sampRegisterChatCommand('amenu', function()
        renderWindow[0] = not renderWindow[0]
    end)   
    while true do
        wait(0)
        
    end
end

Lua:
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
 

Infinqxw

Новичок
Автор темы
27
1
Lua:
script_name('Admin Tools')
script_author('ds:')
script_description('Tools')

local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local inicfg = require 'inicfg'
local directIni = ' Tools.ini'
local ini = inicfg.load(inicfg.load({
    main = {
        enabled = true
    },
}, directIni))
inicfg.save(ini, directIni)


local new = imgui.new

local renderWindow = new.bool(false)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local resX, resY = getScreenResolution()
        local sizeX, sizeY = 300, 300
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        imgui.Begin('Main Window', renderWindow)
      


        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage(u8'[Tools] Успешно запущен.', -1)
    sampRegisterChatCommand('amenu', function()
        renderWindow[0] = not renderWindow[0]
    end) 
    while true do
        wait(0)
      
    end
end

вот фулл код
 
  • Эм
Реакции: MLycoris

cloused2

Известный
398
132
Отрывок кода:
script_name('Admin Tools')
script_author('ds:')
script_description('Tools')

local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local inicfg = require 'inicfg'
local directIni = ' Tools.ini'
local ini = inicfg.load(inicfg.load({
    main = {
        enabled = true
    },
}, directIni))
inicfg.save(ini, directIni)


local new = imgui.new

local renderWindow = new.bool(false)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local resX, resY = getScreenResolution()
        local sizeX, sizeY = 300, 300
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        imgui.Begin('Main Window', renderWindow)
      


        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage(u8'[Tools] Успешно запущен.', -1) -- ПЕРЕД ТЕКСТОМ U8 СТАВИТЬ НЕ НАДО - ДЕФФ ФУНКЦИЯ
    sampRegisterChatCommand('amenu', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
      
    end
end
 

qdIbp

Автор темы
Проверенный
1,438
1,180
Lua:
script_name('Admin Tools')
script_author('ds:')
script_description('Tools')

local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local inicfg = require 'inicfg'
local directIni = ' Tools.ini'
local ini = inicfg.load(inicfg.load({
    main = {
        enabled = true
    },
}, directIni))
inicfg.save(ini, directIni)


local new = imgui.new

local renderWindow = new.bool(false)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local resX, resY = getScreenResolution()
        local sizeX, sizeY = 300, 300
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        imgui.Begin('Main Window', renderWindow)
    


        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage(u8'[Tools] Успешно запущен.', -1)
    sampRegisterChatCommand('amenu', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    
    end
end

вот фулл код
Lua:
script_name('Admin Tools')
script_author('ds:')
script_description('Tools')

local inicfg = require('inicfg')
local imgui = require('mimgui')
local encoding = require('encoding')
encoding.default = 'CP1251'
u8 = encoding.UTF8

local new = imgui.new
local renderWindow = new.bool(false)

local directIni = 'Tools.ini'
local ini = inicfg.load(inicfg.load({
    main = {
        enabled = true
    },
}, directIni))
inicfg.save(ini, directIni)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local sizeX, sizeY = 300, 300
        local resX, resY = getScreenResolution()
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        imgui.Begin('Main Window', renderWindow)

        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('[Tools] Успешно запущен.', -1)
    sampRegisterChatCommand('amenu', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
     
    end
end