-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
local math_lib = {
clamp = function(val, lower, upper)
if lower > upper then lower, upper = upper, lower end
return math.max(lower, math.min(upper, val))
end
}
local lua = {
color = Color.RGBA(157, 162, 255, 255),
font = Render.InitFont('Verdana', 11,{'r'}),
screen = EngineClient.GetScreenSize(),
logs = {
stuff = {},
num = 0,
reason = {
[1] = 'unknown',
[2] = 'spread',
[3] = 'occlusion',
[4] = 'prediction error'
},
hitgroups = {
[0] = "generic",
[1] = "head",
[2] = "chest",
[3] = "stomach",
[4] = "left arm",
[5] = "right arm",
[6] = "left leg",
[7] = "right leg",
[10] = "gear"
}
}
}
local render = {
box = function(string,y,alpha)
local stringsize = Render.CalcTextSize(string,11,lua.font).x
Render.BoxFilled(Vector2.new(lua.screen.x/2-stringsize/2-6.5,lua.screen.y-150-y),Vector2.new(lua.screen.x/2+stringsize/2+6.5,lua.screen.y-120-y),Color.RGBA(0,0,0,80))
Render.BoxFilled(Vector2.new(lua.screen.x/2-stringsize/2-6.5,lua.screen.y-151-y),Vector2.new(lua.screen.x/2+stringsize/2+6.5,lua.screen.y-150-y),lua.color)
Render.Text(string,Vector2.new(lua.screen.x/2,lua.screen.y-136-y),Color.RGBA(255,255,255,255),11,lua.font,true,true)
end
}
local colorpicker = Menu.ColorEdit('Salam','Color',Color.RGBA(255,255,255,255))
Cheat.RegisterCallback('draw',function()
lua.color = colorpicker:Get()
for i, log in ipairs(lua.logs.stuff) do
render.box(log.text,i*45,255)
if log.time + 5 < GlobalVars.realtime then table.remove(lua.logs.stuff,i) end
end
end)
Cheat.RegisterCallback('registered_shot',function(shot)
lua.logs.num = lua.logs.num + 1
if shot.reason == 0 then
table.insert(lua.logs.stuff,{text = 'Hit ' .. EntityList.GetClientEntity(shot.target_index):GetPlayer():GetName() .. "'s in " .. lua.logs.hitgroups[math_lib.clamp(shot.hitgroup,0,10)] .. ' for ' .. shot.damage .. ' damage [spread: ' .. string.format('%.3f°',shot.spread_degree) .. '] [hitchance:' .. shot.hitchance ..' | history:' .. shot.backtrack ..']',time = GlobalVars.realtime})
print('Hit ' .. EntityList.GetClientEntity(shot.target_index):GetPlayer():GetName() .. "'s in " .. lua.logs.hitgroups[math_lib.clamp(shot.hitgroup,0,10)] .. ' for ' .. shot.damage .. ' damage [spread: ' .. string.format('%.3f°',shot.spread_degree) .. '] [hitchance:' .. shot.hitchance ..' | history:' .. shot.backtrack ..']')
else
table.insert(lua.logs.stuff,{text = 'Missed shot in ' .. EntityList.GetClientEntity(shot.target_index):GetPlayer():GetName() .. "'s " .. lua.logs.hitgroups[math_lib.clamp(shot.wanted_hitgroup,0,10)] .. ' due to ' .. lua.logs.reason[shot.reason] .. ' [spread: ' .. string.format('%.3f°',shot.spread_degree) .. '] [hitchance:' .. shot.hitchance ..' | history:' .. shot.backtrack ..']',time = GlobalVars.realtime})
print('Missed shot in ' .. EntityList.GetClientEntity(shot.target_index):GetPlayer():GetName() .. "'s " .. lua.logs.hitgroups[math_lib.clamp(shot.wanted_hitgroup,0,10)] .. ' due to ' .. lua.logs.reason[shot.reason] .. ' [spread: ' .. string.format('%.3f°',shot.spread_degree) .. '] [hitchance:' .. shot.hitchance ..' | history: '.. shot.backtrack ..']')
end
end)