LUA [NIXWARE] JumpScout

  • 20
  • 1
  • 12
Lua:
local jumpscout = ui.add_check_box('Jumpscout', 'jumpscout', false)
local jumpscout_hc = ui.add_slider_int('Hitchance in air', 'jumpscout_hc', 0, 100, 35)
local jumpscout_da = ui.add_check_box('Disable auto stop', 'jumpscout_da', false)
local rage_scout_hitchance = ui.get_slider_int('rage_scout_hitchance')
local rage_auto_stop = ui.get_check_box('rage_scout_autostop')
local rage_as = ui.get_check_box('rage_scout_autostop'):get_value()
local hc_val = ui.get_slider_int('rage_scout_hitchance'):get_value()
local flags = se.get_netvar("DT_BasePlayer", "m_fFlags")

client.register_callback("paint",function()
    jumpscout_hc:set_visible(jumpscout:get_value())
    jumpscout_da:set_visible(jumpscout:get_value())
end)
client.register_callback("create_move",function()
    local lc = entitylist.get_local_player()
    if not jumpscout:get_value() then return end
    local on_ground = bit32.band(lc:get_prop_int(flags), 1) == 1
    if not on_ground then
        rage_scout_hitchance:set_value(jumpscout_hc:get_value())
        
        if jumpscout_da:get_value() then
            rage_auto_stop:set_value(false)
        end
    else
        if rage_scout_hitchance:get_value() ~= jumpscout_hc:get_value() then
            hc_val = rage_scout_hitchance:get_value()
        end
        if rage_auto_stop:get_value() ~= false and jumpscout_da:get_value() then
            rage_as = rage_auto_stop:get_value()
        end
        rage_scout_hitchance:set_value(hc_val)
        if jumpscout_da:get_value() then
            rage_auto_stop:set_value(rage_as)
        end
    end
end)
client.register_callback("unload",function()
    if not jumpscout:get_value() then return end
    rage_scout_hitchance:set_value(hc_val)
    if jumpscout_da:get_value() then
        rage_auto_stop:set_value(rage_as)
    end
end)
 
Сверху Снизу