- Версия MoonLoader
- .026-beta
Lua:
local inicfg = require("inicfg")
local mainIni = inicfg.load({
cfg = {
statsid = '',
statsping = '',
statshp = '',
statsrepd = '',
statsreps = '',
statsint = '',
statstimed = '',
statstimes = '',
statsafkd = '',
statsafks = '',
statsvremia = '',
statsdata = ''
}
},'ADMIN-TOOLS.ini')
inicfg.save(mainIni,'ADMIN-TOOLS.ini')
local checkboxxA = imgui.ImBool(mainIni.cfg.statsid)
local checkboxxB = imgui.ImBool(mainIni.cfg.statsping)
local checkboxxG = imgui.ImBool(mainIni.cfg.statshp)
local checkboxxD = imgui.ImBool(mainIni.cfg.statsrepd)
local checkboxxE = imgui.ImBool(mainIni.cfg.statsreps)
local checkboxxZ = imgui.ImBool(mainIni.cfg.statsint)
local checkboxxQ = imgui.ImBool(mainIni.cfg.statstimed)
local checkboxxU = imgui.ImBool(mainIni.cfg.statstimes)
local checkboxxT = imgui.ImBool(mainIni.cfg.statsafkd)
local checkboxxJ = imgui.ImBool(mainIni.cfg.statsafks)
local checkboxxI = imgui.ImBool(mainIni.cfg.statsvremia)
local checkboxxL = imgui.ImBool(mainIni.cfg.statsdata)
function save()
mainIni.cfg.statsid = checkboxxA.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsping = checkboxxB.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statshp = checkboxxG.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsrepd = checkboxxD.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsreps = checkboxxE.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsint = checkboxxZ.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statstimed = checkboxxQ.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statstimes = checkboxxU.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsafkd = checkboxxT.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsafks = checkboxxJ.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsvremia = checkboxxI.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
mainIni.cfg.statsdata = checkboxxL.v
inicfg.save(mainIni, 'ADMIN-TOOLS.ini')
end
---имгуи ---пример
if imgui.Checkbox(u8"[Вкл/выкл] Показывать ИД", checkboxxA) then save() end
Код:
no matching function call takes this number of arguments and the specified types
Мне просто нужно сохранить положение кнопки = false/ true