local Menu_Smoke_Radius = Menu.SwitchColor("Alternative Grenade Radius", "Smoke Radius", false, Color.new(0.24, 0.57, 0.98, 0.7))
local Menu_Molotov_Radius = Menu.SwitchColor("Alternative Grenade Radius", "Molotov Radius", false, Color.new(1.0, 0.25, 0.25, 0.74))
local Thickness = Menu.SliderInt("Alternative Grenade Radius", "Thickness", 8, 1, 100)
local Quality = Menu.SliderInt("Alternative Grenade Radius", "Quality", 64, 16, 100)
local function Distance_2D(Position_A, Position_B)
return math.sqrt((Position_B.x - Position_A.x) ^ 2 + (Position_B.y - Position_A.y) ^ 2)
end
local function Lerp_Position(Position_A, Position_B, Percentage)
return Vector.new((Position_B.x - Position_A.x) * Percentage + Position_A.x, (Position_B.y - Position_A.y) * Percentage + Position_A.y, (Position_B.z - Position_A.z) * Percentage + Position_A.z)
end
Cheat.RegisterCallback("draw", function()
if Menu_Smoke_Radius:GetBool() then
local Smokes = EntityList.GetEntitiesByName("CSmokeGrenadeProjectile")
for t = 1, #Smokes do
local Smoke = Smokes[t]
if Smoke:GetProp("m_bDidSmokeEffect") == true then
for p = 1, Thickness:GetInt() do
Render.Circle3D(Smoke:GetRenderOrigin(), Quality:GetInt(), 125 - 0.05 * p, Menu_Smoke_Radius:GetColor())
end
end
end
end
if Menu_Molotov_Radius:GetBool() then
local Molotovs = EntityList.GetEntitiesByName("CInferno")
for i = 1, #Molotovs do
local Molotov = Molotovs[i]
local Origin = Molotov:GetRenderOrigin()
local Cell_Radius = 40
local Molotov_Radius = 0
local Cells = {}
local Maximum_Distance = 0
local Cell_Max_A, Cell_Max_B
for i = 1, 64 do
if Molotov:GetProp("m_bFireIsBurning")[i] == true then
table.insert(Cells, Vector.new(Molotov:GetProp("m_fireXDelta")[i], Molotov:GetProp("m_fireYDelta")[i], Molotov:GetProp("m_fireZDelta")[i]))
end
end
for v = 1, #Cells do
for k = 1, #Cells do
local Distance = Distance_2D(Cells[v], Cells[k])
if Distance > Maximum_Distance then
Maximum_Distance = Distance
Cell_Max_A = Cells[v]
Cell_Max_B = Cells[k]
end
end
end
if Cell_Max_A ~= nil and Cell_Max_B ~= nil then
local Center_Delta = Lerp_Position(Cell_Max_A, Cell_Max_B, 0.5)
local Center = Origin + Center_Delta
for g = 1, Thickness:GetInt() do
Render.Circle3D(Center, Quality:GetInt(), Maximum_Distance / 2 + Cell_Radius - 0.05 * g, Menu_Molotov_Radius:GetColor())
end
end
end
end
end)
Калькуляции для расчета центра гренейда и его радиуса, диаметра не требуется, все хранится в данных игры, калькуляция сделана криво у него, согласен. Но у тебя такая же фигня, она не требуется, вы просто нагружаете память игры и сегмента чита.бро, это не гренейд есп, это молли и смоук радиус который сделан очень криво.
он не высчитывает центр молотова через fire x, y, z delta, а тупо рисует круг вокруг CInferno, при чем жрет прилично.
нормальный молли и смоук радиус я приложил.
попробуй сделать нормальный гренейд есп как в ските (есть пейд, я знаю)
Lua:local Menu_Smoke_Radius = Menu.SwitchColor("Alternative Grenade Radius", "Smoke Radius", false, Color.new(0.24, 0.57, 0.98, 0.7)) local Menu_Molotov_Radius = Menu.SwitchColor("Alternative Grenade Radius", "Molotov Radius", false, Color.new(1.0, 0.25, 0.25, 0.74)) local Thickness = Menu.SliderInt("Alternative Grenade Radius", "Thickness", 8, 1, 100) local Quality = Menu.SliderInt("Alternative Grenade Radius", "Quality", 64, 16, 100) local function Distance_2D(Position_A, Position_B) return math.sqrt((Position_B.x - Position_A.x) ^ 2 + (Position_B.y - Position_A.y) ^ 2) end local function Lerp_Position(Position_A, Position_B, Percentage) return Vector.new((Position_B.x - Position_A.x) * Percentage + Position_A.x, (Position_B.y - Position_A.y) * Percentage + Position_A.y, (Position_B.z - Position_A.z) * Percentage + Position_A.z) end Cheat.RegisterCallback("draw", function() if Menu_Smoke_Radius:GetBool() then local Smokes = EntityList.GetEntitiesByName("CSmokeGrenadeProjectile") for t = 1, #Smokes do local Smoke = Smokes[t] if Smoke:GetProp("m_bDidSmokeEffect") == true then for p = 1, Thickness:GetInt() do Render.Circle3D(Smoke:GetRenderOrigin(), Quality:GetInt(), 125 - 0.05 * p, Menu_Smoke_Radius:GetColor()) end end end end if Menu_Molotov_Radius:GetBool() then local Molotovs = EntityList.GetEntitiesByName("CInferno") for i = 1, #Molotovs do local Molotov = Molotovs[i] local Origin = Molotov:GetRenderOrigin() local Cell_Radius = 40 local Molotov_Radius = 0 local Cells = {} local Maximum_Distance = 0 local Cell_Max_A, Cell_Max_B for i = 1, 64 do if Molotov:GetProp("m_bFireIsBurning")[i] == true then table.insert(Cells, Vector.new(Molotov:GetProp("m_fireXDelta")[i], Molotov:GetProp("m_fireYDelta")[i], Molotov:GetProp("m_fireZDelta")[i])) end end for v = 1, #Cells do for k = 1, #Cells do local Distance = Distance_2D(Cells[v], Cells[k]) if Distance > Maximum_Distance then Maximum_Distance = Distance Cell_Max_A = Cells[v] Cell_Max_B = Cells[k] end end end if Cell_Max_A ~= nil and Cell_Max_B ~= nil then local Center_Delta = Lerp_Position(Cell_Max_A, Cell_Max_B, 0.5) local Center = Origin + Center_Delta for g = 1, Thickness:GetInt() do Render.Circle3D(Center, Quality:GetInt(), Maximum_Distance / 2 + Cell_Radius - 0.05 * g, Menu_Molotov_Radius:GetColor()) end end end end end)