accent

Arizona Mobile 3

Потрачен
Автор темы
117
13
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
Другое
Как сделать в данном коде покп активен чек бокс акцент роботал если выкл акцент не роботал


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

local window = imgui.new.bool(true)
local accent = imgui.new.char[256]()

local frame = imgui.OnFrame(function() return window[0] end,
    function(ok)
        imgui.Begin('window', window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoTitleBar)
        imgui.InputText('label', accent, ffi.sizeof(accent))
        imgui.End()
    end
)

local samp = require('samp.events')
function samp.onSendChat(message)
    return { u8:decode(ffi.string(accent)) .. message }
end
 

Arizona Mobile 3

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

chromiusj

fullstack eblan
Модератор
5,754
4,055
так я спаришиваю как применить
Lua:
local imgui = require('mimgui')
local ffi = require('ffi')
local encoding = require('encoding')
encoding.default = 'CP1251'
local u8 = encoding.UTF8

local window = imgui.new.bool(true)
local accent = imgui.new.char[256]()
local activation = imgui.new.bool()
local frame = imgui.OnFrame(function() return window[0] end,
    function(ok)
        imgui.Begin('window', window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoTitleBar)
        if imgui.Checkbox(u8'Акцент',activation) then
            activation[0] = not activation[0]
        end
        imgui.InputText('label', accent, ffi.sizeof(accent))
        imgui.End()
    end
)

local samp = require('samp.events')
function samp.onSendChat(message)
    if activation[0] then
        return { u8:decode(ffi.string(accent)) .. message }
    end
end
 
  • Нравится
Реакции: plalkeo

Arizona Mobile 3

Потрачен
Автор темы
117
13
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
local imgui = require('mimgui')
local ffi = require('ffi')
local encoding = require('encoding')
encoding.default = 'CP1251'
local u8 = encoding.UTF8

local window = imgui.new.bool(true)
local accent = imgui.new.char[256]()
local activation = imgui.new.bool()
local frame = imgui.OnFrame(function() return window[0] end,
    function(ok)
        imgui.Begin('window', window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoTitleBar)
        if imgui.Checkbox(u8'Акцент',activation) then
            activation[0] = not activation[0]
        end
        imgui.InputText('label', accent, ffi.sizeof(accent))
        imgui.End()
    end
)

local samp = require('samp.events')
function samp.onSendChat(message)
    if activation[0] then
        return { u8:decode(ffi.string(accent)) .. message }
    end
end
спс