Results 1 to 4 of 4
  1. #1
    asuchan's Avatar
    Join Date
    Aug 2015
    Gender
    female
    Posts
    74
    Reputation
    19
    Thanks
    24

    Better Dynamic 2D/3D Box ESP

    Noticed people are pasting from this horrid old dynamic box esp so I decided to make one from scratch, it's much better.

    Feel free to use, make sure you credit me though (most of you won't anyways).

    Source:
    https://pastebin.com/epRrppVR

    Code:
    --[[
        Dynamic 2D/3D box esp
            by Kujou
    ]]--
    
    local function Draw3DBox(pos,min,max)
        -- Thanks dad
        local b = {}
        -- Bottom Square
        b[1] = {Vector(min.x,min.y,min.z),Vector(max.x,min.y,min.z)}
        b[2] = {Vector(min.x,min.y,min.z),Vector(min.x,max.y,min.z)}
        b[3] = {Vector(min.x,max.y,min.z),Vector(max.x,max.y,min.z)}
        b[4] = {Vector(max.x,max.y,min.z),Vector(max.x,min.y,min.z)}
        -- Pillars
        b[5] = {Vector(min.x,min.y,min.z),Vector(min.x,min.y,max.z)}
        b[6] = {Vector(min.x,max.y,min.z),Vector(min.x,max.y,max.z)}
        b[7] = {Vector(max.x,max.y,min.z),Vector(max.x,max.y,max.z)}
        b[8] = {Vector(max.x,min.y,min.z),Vector(max.x,min.y,max.z)}
        -- Top Square
        b[9] = {Vector(min.x,min.y,max.z),Vector(max.x,min.y,max.z)}
        b[10] = {Vector(min.x,min.y,max.z),Vector(min.x,max.y,max.z)}
        b[11] = {Vector(min.x,max.y,max.z),Vector(max.x,max.y,max.z)}
        b[12] = {Vector(max.x,max.y,max.z),Vector(max.x,min.y,max.z)}
        -- Iterate corners and draw line to join them
        for k,v in next,b do
            local p = pos:ToScreen()
            local s = (pos + v[1]):ToScreen()
            local e = (pos + v[2]):ToScreen()
            surface.DrawLine(s.x,s.y,e.x,e.y)
        end
    end
    
    local function Draw2DBox(pos,min,max)
        local h = (pos + Vector(0,0,max.z)):ToScreen().y
        min = min + pos
        max = max + pos
        pos = pos:ToScreen()
        -- just the sides of the box are needed
        local s = {}
        s[1] = Vector(min.x,min.y,0):ToScreen().x
        s[2] = Vector(min.x,max.y,0):ToScreen().x
        s[3] = Vector(max.x,max.y,0):ToScreen().x
        s[4] = Vector(max.x,min.y,0):ToScreen().x
        -- lowest = left side of the box, highest = right side of the box 
        local lowest = math.min(unpack(s))
        local highest = math.max(unpack(s))
        -- Drawing the box itself
        surface.DrawOutlinedRect(lowest,h,highest-lowest,pos.y-h)
    end
    
    local function DrawESP()
        for k,v in next, player.GetAll() do
                if (v == LocalPlayer() || v:IsDormant() || !ply:Alive()) then
                    continue
                end
                local pos,min,max = ply:GetPos(),ply:OBBMins(),ply:OBBMaxs()
                surface.SetDrawColor(255,0,0)
                Draw3DBox(pos,min,max)
                surface.SetDrawColor(0,255,0)
                Draw2DBox(pos,min,max)
        end
    end
    hook.Add("HUDPaint","esp",DrawESP)
    Last edited by Hunter; 01-17-2016 at 01:08 PM.

  2. #2
    tanner1031's Avatar
    Join Date
    Jul 2012
    Gender
    female
    Posts
    46
    Reputation
    10
    Thanks
    659
    you have to change a couple things to make this work. will probably confuse 90% of the retarded people here.
    Last edited by tanner1031; 10-05-2015 at 02:31 PM.

  3. #3
    0 - p100 real quick's Avatar
    Join Date
    Sep 2015
    Gender
    female
    Posts
    19
    Reputation
    10
    Thanks
    503
    Since this is an ESP thread an everything, here's my totally not dynamic but still pcool ESP codes
    Code:
    function *****rnerBox(x, y, w, h, color)
        surface.SetDrawColor(color)
    
        // Box: Upper Left Corner
        surface.DrawLine(x, y, x, y + (h / 5))
        surface.DrawLine(x, y, x + (w / 5), y)
    
        // Box: Upper Right
        surface.DrawLine(x + w, y, x + w - (w / 5), y)
        surface.DrawLine(x + w, y, x + w, y + (h / 5))
    
        // Box: Bottom Left Corner
        surface.DrawLine(x, y + h, x + (w / 5), y + h)
        surface.DrawLine(x, y + h, x, y + h - (h / 5))
    
        // Box: Bottom Right Corner
        surface.DrawLine(x + w, y + h, x + w - (w / 5), y + h)
        surface.DrawLine(x + w, y + h, x + w, y + h - (h / 5))
    end
    
    function X.DrawCornerBoxOutlined(x, y, w, h, color)
        *****rnerBox(x - 1, y - 1, w + 2, h + 2, color)
        *****rnerBox(x, y, w, h, Color(196, 196, 196, 255))
    end
    i.imgur .com/jTxoPE7.jpg
    Last edited by 0 - p100 real quick; 10-12-2015 at 02:22 PM.

  4. #4
    X7334's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by 0 - p100 real quick View Post
    Since this is an ESP thread an everything, here's my totally not dynamic but still pcool ESP codes
    Code:
    function *****rnerBox(x, y, w, h, color)
        surface.SetDrawColor(color)
    
        // Box: Upper Left Corner
        surface.DrawLine(x, y, x, y + (h / 5))
        surface.DrawLine(x, y, x + (w / 5), y)
    
        // Box: Upper Right
        surface.DrawLine(x + w, y, x + w - (w / 5), y)
        surface.DrawLine(x + w, y, x + w, y + (h / 5))
    
        // Box: Bottom Left Corner
        surface.DrawLine(x, y + h, x + (w / 5), y + h)
        surface.DrawLine(x, y + h, x, y + h - (h / 5))
    
        // Box: Bottom Right Corner
        surface.DrawLine(x + w, y + h, x + w - (w / 5), y + h)
        surface.DrawLine(x + w, y + h, x + w, y + h - (h / 5))
    end
    
    function X.DrawCornerBoxOutlined(x, y, w, h, color)
        *****rnerBox(x - 1, y - 1, w + 2, h + 2, color)
        *****rnerBox(x, y, w, h, Color(196, 196, 196, 255))
    end
    i.imgur .com/jTxoPE7.jpg
    That's public UC espbox, exact code lol
    Hello!

    I like c++ and reversing sometimes

Similar Threads

  1. [Release] Box ESP
    By ac1d_buRn in forum Combat Arms Hacks & Cheats
    Replies: 177
    Last Post: 02-03-2010, 01:27 PM
  2. [Release] .177 Box ESP & Name ESP
    By big_will in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 134
    Last Post: 01-24-2010, 09:30 PM
  3. [Release] .180 Box ESP & Name ESP
    By wojfi in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 4
    Last Post: 01-23-2010, 04:21 AM
  4. I need box ESP or name ESP hack
    By maximkap1 in forum Call of Duty Modern Warfare 2 Help
    Replies: 5
    Last Post: 01-20-2010, 12:24 PM
  5. did someone have an esp (name esp and box esp) for 1.0.174???
    By killstreak in forum Call of Duty Modern Warfare 2 Help
    Replies: 0
    Last Post: 12-30-2009, 02:28 PM