Message
Message
local Tools = {}
Tools.YawTo360 = function(yawbruto)
if yawbruto < 0 then
return 360 + yawbruto;
end
return yawbruto;
end
Tools.YawTo180 = function(yawbruto)
if yawbruto > 180 then
return yawbruto - 360;
end
return yawbruto;
end
Tools.YawNormalizer = function(yawbruto)
if yawbruto > 360 then
return yawbruto - 360;
elseif yawbruto < 0 then
return 360 + yawbruto;
end
return yawbruto;
end
function Enable_Update()
if ui.get(MenuC["Enable"]) then
ui.set_visible(MenuC["DebugLogs"], true);
ui.set_visible(MenuC["Flag"], true);
--ui.set_visible(MenuV["Anti-Aim Correction"], false);
ui.set_visible(MenuV["ForceBodyYaw"], false);
ui.set_visible(MenuV["CorrectionActive"], false);
--ui.set(MenuV["Anti-Aim Correction"], false);
else
ui.set_visible(MenuC["DebugLogs"], false);
ui.set_visible(MenuC["Flag"], false);
--ui.set_visible(MenuV["Anti-Aim Correction"], true);
ui.set_visible(MenuV["ForceBodyYaw"], true);
ui.set_visible(MenuV["CorrectionActive"], true);
--ui.set(MenuV["Anti-Aim Correction"], true);
ui.set(MenuV["ResetAll"], true);
end
end
Enable_Update();
ui.set_callback(MenuC["Enable"], function()
Enable_Update();
end)
for i = 1, 64, 1 do
SideCount[i] = 0;
Side[i] = "Left";
Desync[i] = 25;
TempPitch[i] = 0;
end
function Resolver()
if not ui.get(MenuC["Enable"]) then
return;
end
--local Lp = entity.get_local_player();
for u = 1, 13, 1 do
Animlayers[u] = {};
Animlayers[u]["Main"] = get_anim_layer(PlayerP, u);
Animlayers[u]["m_flPrevCycle"] = Animlayers[u]
["Main"].m_flPrevCycle;
Animlayers[u]["m_flWeight"] = Animlayers[u]
["Main"].m_flWeight;
Animlayers[u]["m_flWeightDeltaRate"] = Animlayers[u]
["Main"].m_flWeightDeltaRate;
Animlayers[u]["m_flPlaybackRate"] = Animlayers[u]
["Main"].m_flPlaybackRate;
Animlayers[u]["m_flCycle"] = Animlayers[u]
["Main"].m_flCycle;
AnimParts[u] = {};
for y, val in pairs(AnimList) do
AnimParts[u][val] = {};
for i = 1, 13, 1 do
AnimParts[u][val][i] = math.floor(Animlayers[u][val]*(10^i)) -
(math.floor(Animlayers[u][val]*(10^(i-1)))*10);
end
end
end
local Tmp;
if AnimParts[6]["m_flWeight"][2] == 0 then
if (Animlayers[6]["m_flWeight"]*10^5 > 300) then
SideCount[Player] = SideCount[Player] + 1;
else
SideCount[Player] = 0;
end
elseif AnimParts[6]["m_flWeight"][1] == 9 then
if Temp45 == 29 then
Side[Player] = "Left";
elseif Temp45 == 30 then
Side[Player] = "Right";
elseif AnimParts[6]["m_flWeight"][2] == 9 then
SideCount[Player] = SideCount[Player] + 2;
else
SideCount[Player] = 0;
end
end
-----------------------------------------------------------------------------------
---
-----------------------------------------------------------------------------------
---
local trashcan = {
--if Animlayers["m_flPlaybackRate"][3] == 0 then
--print(string.format("Anim67: %s | Anim89: %s | Diff: %s", Anim67, Anim89,
math.abs(Anim67-Anim89)));
--print(Anim6789);
--if RSideS > 30 then
--print(RSideS);
--end
--else
--print(string.format("Anim45: %s | Anim67: %s | Diff: %s", Anim45, Anim67,
math.abs(Anim45-Anim67)));
--print(Anim4567);
--print(RSideR);
--end
--entity.get_prop(Player, "m_fFlags");
--entity.get_prop(Player, "m_bSpotted");
--entity.get_prop(Player, "m_flSimulationTime");
-- Desync[Player] = 60;
--else
-- ResolverWorking[Player] = false;
--end
};
client.set_event_callback("net_update_end", Resolver);
return false;
end)
return false;
end)
client.set_event_callback('aim_hit', function(e)
if not ui.get(MenuC["Enable"]) or not ui.get(MenuC["DebugLogs"]) then
return;
end
local P = e.target;
if e.hitgroup == 1 then
print(string.format("Hitted shot (Side: %s | Desync: %s)", Side[P],
Desync[P]));
end
end)
client.set_event_callback('aim_miss', function(e)
if ui.get(MenuC["Enable"]) then
local P = e.target;
client.set_event_callback('shutdown', function()
--ui.set_visible(MenuV["Anti-Aim Correction"], true);
ui.set_visible(MenuV["ForceBodyYaw"], true);
ui.set_visible(MenuV["CorrectionActive"], true);
--ui.set(MenuV["Anti-Aim Correction"], true);
ui.set(MenuV["ResetAll"], true);
end)