Код:
local menuGroups = ui.add_combo_box('', 'menuGroups', { 'AntiAims', 'Rage', 'Visuals', 'Misc' }, 0)
local function showAntiAims(show)
end
local function showVisuals(show)
scale_thirdperson:set_visible(show)
thirdperson_scale:set_visible(show)
end
local function showMisc(show)
end
local function showOverrides(show)
end
local function showElements()
local currentGroup = menuGroups:get_value()
showAntiAims(currentGroup == 0)
showRage(currentGroup == 1)
showVisuals(currentGroup == 2)
showMisc(currentGroup == 3)
end
scale_thirdperson = ui.add_check_box("Thirdperson distance", "scale_thirdperson", false)
thirdperson_scale = ui.add_slider_int("Thirdperson scale", "thirdperson_scale", 65, 200, 120)
once_thirdperson = false
client.register_callback("create_move", function()
if scale_thirdperson:get_value() then se.get_convar("cam_idealdist"):set_int(scale_thirdperson:get_value() and thirdperson_scale:get_value() or 120) end
if scale_thirdperson:get_value() and not once_thirdperson then once_thirdperson = not once_thirdperson end
if not scale_thirdperson:get_value() and once_thirdperson then once_thirdperson = not once_thirdperson; se.get_convar("cam_idealdist"):set_int(120) end
end)
client.register_callback("unload", function() if scale_thirdperson:get_value() then se.get_convar("cam_idealdist"):set_int(120) end end)
Есть еще предположение , что можно так -
Код:
if menuGroups:get_value() = 2 then scale_thirdperson:set_visible(0)