- 119
- 7
После добавления чекбокса крашит скрипт, чем это может быть вызвано?
local imgui = require 'imgui'
local mm = imgui.ImBool(false)
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage('{ff0000} [ADVH] {ffffff} The script is {50c878} loaded! ', 0xffffff)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Activation: {00ffff} /advh', 0xffffff)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Author: {00ffff} goose', 0xffffff)
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('advh', function()
mm.v = not mm.v
imgui.Process =mm.v
end)
wait(-1)
end
function imgui.OnDrawFrame()
imgui.Begin('ADV Helper by goose')
if imgui.Button('Information') then
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Author: {00ffff} goose', -1)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Script version: {50c878} 1.0', -1)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} VK: {00ffff} @nekazav', -1)
end
imgui.Checkbox('Short commands', checked_test)
imgui.End()
end
local mm = imgui.ImBool(false)
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage('{ff0000} [ADVH] {ffffff} The script is {50c878} loaded! ', 0xffffff)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Activation: {00ffff} /advh', 0xffffff)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Author: {00ffff} goose', 0xffffff)
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('advh', function()
mm.v = not mm.v
imgui.Process =mm.v
end)
wait(-1)
end
function imgui.OnDrawFrame()
imgui.Begin('ADV Helper by goose')
if imgui.Button('Information') then
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Author: {00ffff} goose', -1)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} Script version: {50c878} 1.0', -1)
sampAddChatMessage('{ff0000} [ADVH] {ffffff} VK: {00ffff} @nekazav', -1)
end
imgui.Checkbox('Short commands', checked_test)
imgui.End()
end