local ffi = require("ffi")
ffi.cdef[[
typedef void* (__thiscall* GetClientClassFn)(void*);
typedef bool (__thiscall* ShouldDrawFn)(void*);
typedef int (__thiscall* GetTeamFn)(void*);
typedef bool (__thiscall* IsDormantFn)(void*);
typedef Vector* (__thiscall* GetAbsOriginFn)(void*);
typedef Vector* (__thiscall* GetAbsAnglesFn)(void*);
class C_BasePlayer {
public:
virtual GetClientClassFn GetClientClass;
virtual ShouldDrawFn ShouldDraw;
virtual GetTeamFn GetTeam;
virtual IsDormantFn IsDormant;
virtual GetAbsOriginFn GetAbsOrigin;
virtual GetAbsAnglesFn GetAbsAngles;
char pad[0x4];
bool bSendPackets;
};
]]
local client_ent_list = ffi.cast("void***", utils.PatternScan("client.dll", "A1 ? ? ? ? 8B 80 ? ? ? ? 40 C3"))
local get_local_player_fn = ffi.cast("int(__thiscall*)(void*)", utils.PatternScan("client.dll", "8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7"))
local local_player = ffi.cast("C_BasePlayer*", client_ent_list[0][get_local_player_fn(client_ent_list[0]) - 1])
-- Получаешь само значение bSendPackets
local bSendPackets = local_player.bSendPackets