Вопрос [NL]Помогите зафиксить zero pitch on land

Начинающий
Статус
Оффлайн
Регистрация
30 Апр 2022
Сообщения
194
Реакции[?]
8
Поинты[?]
1K
code_language.lua:
local entity_get_players, entity_get_local_player, hooked_function = entity.get_players, entity.get_local_player,  nil
local vmt_hook = require("neverlose/vmt_hook")

ffi.cdef[[
    typedef void*(__thiscall* get_client_entity_t)(void*, int);
]]

local function this_call(call_function, parameters)
    return function(...)
        return call_function(parameters, ...)
    end
end


local group = ui.create("Anim", "Anim")
local entity_list_003 = ffi.cast(ffi.typeof("uintptr_t**"), utils.create_interface("client.dll", "VClientEntityList003"))
local get_entity_address = this_call(ffi.cast("get_client_entity_t", entity_list_003[0][3]), entity_list_003)
local anim_breakers = group:selectable("Anim. breakers", {'Static legs in air', 'Follow direction', 'Zero pitch on land'}, 0)
local legmovement = ui.find("Aimbot", "Anti Aim", "Misc", "Leg Movement")
local hook_function, is_on_ground = nil, false

local ground_ticks, end_time = 1, 0


local function in_air()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]

    if bit.band(flags, 1) == 0 then
        return true
    end

    return false
end

inside_updateCSA = function(thisptr, edx)
    hooked_function(thisptr, edx)
    if entity_get_local_player() == nil or ffi.cast('uintptr_t**', thisptr) == nil then return end

    if anim_breakers:get('Static legs in air') then
        entity_get_local_player().m_flPoseParameter[6] = 1
    end

    if anim_breakers:get('Zero pitch on land') then
        entity_get_local_player().m_flPoseParameter[12] = 1
    end

    if anim_breakers:get('Follow direction') then
        entity_get_local_player().m_flPoseParameter[7] = 1
        legmovement:override('walking')
    end

    if anim_breakers:get("Zero pitch on land") then
        if bit.band(entity.get_local_player()["m_fFlags"], 1) == 1 then
            ground_ticks = ground_ticks + 1
        else
            ground_ticks = 0
            end_time = globals.curtime  + 1
        end
        if not in_air() and ground_ticks > 1 and end_time > globals.curtime then
            entity_get_local_player().m_flPoseParameter[12] = 0.5
        end
    end
end

update_hook = function()
    local self = entity_get_local_player()
    if not self or not self:is_alive() then
        return
    end

    local self_index = self:get_index()
    local self_address = get_entity_address(self_index)

    if not self_address or hooked_function then
        return
    end

    local new_point = vmt_hook.new(self_address)
    hooked_function = new_point.hook("void(__fastcall*)(void*, void*)", inside_updateCSA, 224)
end

events.createmove_run:set(function(cmd)
    update_hook()
end)
code_language.lua:
local entity_get_players, entity_get_local_player, hooked_function = entity.get_players, entity.get_local_player,  nil
local vmt_hook = require("neverlose/vmt_hook")

ffi.cdef[[
    typedef void*(__thiscall* get_client_entity_t)(void*, int);
]]

local function this_call(call_function, parameters)
    return function(...)
        return call_function(parameters, ...)
    end
end


local group = ui.create("Anim", "Anim")
local entity_list_003 = ffi.cast(ffi.typeof("uintptr_t**"), utils.create_interface("client.dll", "VClientEntityList003"))
local get_entity_address = this_call(ffi.cast("get_client_entity_t", entity_list_003[0][3]), entity_list_003)
local anim_breakers = group:selectable("Anim. breakers", {'Static legs in air', 'Follow direction', 'Zero pitch on land'}, 0)
local legmovement = ui.find("Aimbot", "Anti Aim", "Misc", "Leg Movement")
local hook_function, is_on_ground = nil, false

local function in_air()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]

    if bit.band(flags, 1) == 0 then
        return true
    end

    return false
end

inside_updateCSA = function(thisptr, edx)
    hooked_function(thisptr, edx)
    if entity_get_local_player() == nil or ffi.cast('uintptr_t**', thisptr) == nil then return end

    if anim_breakers:get('Static legs in air') then
        entity_get_local_player().m_flPoseParameter[6] = 1
    end

    if anim_breakers:get('Zero pitch on land') then
        entity_get_local_player().m_flPoseParameter[12] = 1
    end

    if anim_breakers:get('Follow direction') then
        entity_get_local_player().m_flPoseParameter[7] = 1
        legmovement:override('walking')
    end

    if anim_breakers:get("Zero pitch on land") then
        if bit.band(entity.get_local_player()["m_fFlags"], 1) == 1 then
            ground_ticks = ground_ticks + 1
        else
            ground_ticks = 0
            end_time = globals.curtime  + 1
        end
        if not in_air() and ground_ticks > 1 and end_time > globals.curtime then
            entity_get_local_player().m_flPoseParameter[12] = 0.5
        end
    end
end

update_hook = function()
    local self = entity_get_local_player()
    if not self or not self:is_alive() then
        return
    end

    local self_index = self:get_index()
    local self_address = get_entity_address(self_index)

    if not self_address or hooked_function then
        return
    end

    local new_point = vmt_hook.new(self_address)
    hooked_function = new_point.hook("void(__fastcall*)(void*, void*)", inside_updateCSA, 224)
end

events.createmove_run:set(function(cmd)
    update_hook()
end)
там оно когда ешку прожимаешь вниз смотрит
 
Последнее редактирование:
Сверху Снизу