-
Notifications
You must be signed in to change notification settings - Fork 3
/
espeverything.lua
28 lines (24 loc) · 1004 Bytes
/
espeverything.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--name esp everything
--desc draws a box around every entity
--author sekc
local entities = {}
function onDraw()
for i, ent in pairs(entities) do
draw.outlineText(Vec2(ent.box.x + ((ent.box.z - ent.box.x) - draw.calcTextSize(ent.classID .. " | " .. ent.networkName).x)/2, ent.box.y - 14), Color(1, 1, 1, 1), ent.classID .. " | " .. ent.networkName)
draw.rectangle(Vec2(ent.box.x, ent.box.y), Vec2(ent.box.z, ent.box.w), Color(0, 0, 0, 1), 3)
draw.rectangle(Vec2(ent.box.x, ent.box.y), Vec2(ent.box.z, ent.box.w), Color(1, 1, 1, 1), 1)
end
end
function onCreateMove()
entities = {}
for i, ent in pairs(entitylist.getEntities()) do
if ent:sane() then
local box = ent:getBBox()
if box.y > 0 then
entities[i] = {box = ent:getBBox(), classID = ent:classID(), networkName = ent:networkName()}
end
end
end
end
eclipse.registerHook("createMove", onCreateMove)
eclipse.registerHook("draw", onDraw)