-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
neverlose leg breaker
Код:
ffi.cdef[[
typedef void*(__thiscall* get_client_entity_t)(void*, int);
typedef struct {
char pad_0000[20];
int m_nOrder; //0x0014
int m_nSequence; //0x0018
float m_flPrevCycle; //0x001C
float m_flWeight; //0x0020
float m_flWeightDeltaRate; //0x0024
float m_flPlaybackRate; //0x0028
float m_flCycle; //0x002C
void *m_pOwner; //0x0030
char pad_0038[4]; //0x0034
} CAnimationLayer;
]]
local vmt_hook = require("neverlose/vmt_hook")
local aaicon = ui.get_icon("cogs")
local main_aa = ui.create(aaicon.. " Anti-Aim", aaicon.. " Anti-Aim")
local animbreakers = main_aa:selectable("Anim. Breakers", {"Leg Breaker In Air"})
local uintptr_t = ffi.typeof("uintptr_t**")
local this_call = function(call_function, parameters)
return function(...)
return call_function(parameters, ...)
end
end
local entity_list_003 = ffi.cast(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 hooked_function = nil
local inside_updateCSA = function(thisptr, edx)
hooked_function(thisptr, edx)
local lp = entity.get_local_player()
if not lp or not lp:is_alive() then return end
if animbreakers:get("Leg Breaker In Air") then
ffi.cast('CAnimationLayer**', ffi.cast('uintptr_t', thisptr) + 0x2990)[0][6].m_flWeight = 1
end
end
function hookfield()
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()
hookfield()
end)