Ищу Ищу луа на никсвар.

  • 457
  • 48
Контакты для связи отсутствуют.
Нужны мануалы отдельной луа
Код:
local right_manual = ui.add_key_bind("right", "right_manual", 0, 2)
local left_manual = ui.add_key_bind("left", "left_manual", 0, 2)
local back_manual = ui.add_key_bind("back", "back_manual", 0, 2)
local forward_manual = ui.add_key_bind("forward", "forward_manual", 0, 2)

local m_iHealth = se.get_netvar("DT_BasePlayer", "m_iHealth")
local m_bPinPulled = se.get_netvar("DT_BaseCSGrenade", "m_bPinPulled")
local m_fThrowTime = se.get_netvar("DT_BaseCSGrenade", "m_fThrowTime")
local m_hActiveWeapon = se.get_netvar("DT_BaseCombatCharacter", "m_hActiveWeapon")

function hasbit(x, p) return x % (p + p) >= p end

local m_iSide = 0
local prev_side = 0

client.register_callback("create_move", function(pCmd)
    local local_player = entitylist:get_local_player()
    if local_player:get_prop_int(m_iHealth) < 1 then return end
    local active_weapon_handle = local_player:get_prop_int(m_hActiveWeapon)
    local iWeapon = entitylist.get_entity_from_handle(active_weapon_handle)
    local throwTime = iWeapon:get_prop_float(m_fThrowTime)

        if not iWeapon:get_prop_bool(m_bPinPulled) then
            if throwTime > 0 then return end
        end
        if hasbit(pCmd.buttons, 1) or hasbit(pCmd.buttons, 2048) then
            if throwTime > 0 then return end
        end

    if hasbit(pCmd.buttons, 32) then return end
    if hasbit(pCmd.buttons, 1) then return end

    if client.is_key_clicked(left_manual:get_key()) then
        m_iSide = 1   
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(right_manual:get_key()) then
        m_iSide = 2
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(forward_manual:get_key()) then
        m_iSide = 3
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(back_manual:get_key()) then
        m_iSide = 4
    end


    if m_iSide == 1 then
       pCmd.viewangles.yaw = pCmd.viewangles.yaw - 90
    end
    if m_iSide == 2 then
       pCmd.viewangles.yaw = pCmd.viewangles.yaw + 90
    end
    if m_iSide == 3 then
        pCmd.viewangles.yaw = pCmd.viewangles.yaw + 180
    end
    if m_iBackward == 4 then
        pCmd.viewangles.yaw = pCmd.viewangles.yaw + 175
    end
    prev_side = m_iSide
end)
 
  • 278
  • 82
Код:
local right_manual = ui.add_key_bind("right", "right_manual", 0, 2)
local left_manual = ui.add_key_bind("left", "left_manual", 0, 2)
local back_manual = ui.add_key_bind("back", "back_manual", 0, 2)
local forward_manual = ui.add_key_bind("forward", "forward_manual", 0, 2)

local m_iHealth = se.get_netvar("DT_BasePlayer", "m_iHealth")
local m_bPinPulled = se.get_netvar("DT_BaseCSGrenade", "m_bPinPulled")
local m_fThrowTime = se.get_netvar("DT_BaseCSGrenade", "m_fThrowTime")
local m_hActiveWeapon = se.get_netvar("DT_BaseCombatCharacter", "m_hActiveWeapon")

function hasbit(x, p) return x % (p + p) >= p end

local m_iSide = 0
local prev_side = 0

client.register_callback("create_move", function(pCmd)
    local local_player = entitylist:get_local_player()
    if local_player:get_prop_int(m_iHealth) < 1 then return end
    local active_weapon_handle = local_player:get_prop_int(m_hActiveWeapon)
    local iWeapon = entitylist.get_entity_from_handle(active_weapon_handle)
    local throwTime = iWeapon:get_prop_float(m_fThrowTime)

        if not iWeapon:get_prop_bool(m_bPinPulled) then
            if throwTime > 0 then return end
        end
        if hasbit(pCmd.buttons, 1) or hasbit(pCmd.buttons, 2048) then
            if throwTime > 0 then return end
        end

    if hasbit(pCmd.buttons, 32) then return end
    if hasbit(pCmd.buttons, 1) then return end

    if client.is_key_clicked(left_manual:get_key()) then
        m_iSide = 1  
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(right_manual:get_key()) then
        m_iSide = 2
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(forward_manual:get_key()) then
        m_iSide = 3
        if prev_side == m_iSide then
            m_iSide = 4
        end
    end
    if client.is_key_clicked(back_manual:get_key()) then
        m_iSide = 4
    end


    if m_iSide == 1 then
       pCmd.viewangles.yaw = pCmd.viewangles.yaw - 90
    end
    if m_iSide == 2 then
       pCmd.viewangles.yaw = pCmd.viewangles.yaw + 90
    end
    if m_iSide == 3 then
        pCmd.viewangles.yaw = pCmd.viewangles.yaw + 180
    end
    if m_iBackward == 4 then
        pCmd.viewangles.yaw = pCmd.viewangles.yaw + 175
    end
    prev_side = m_iSide
end)
калловая масса а не код
 
Сверху Снизу