• Help with Text above entity (Cam.3D2D)
    3 replies, posted
This is my code, but this hook don't drawing, can you help me? hook.Add("HUDPaint", "ESPgrenade", function()    if GetConVar("grenadeesp"):GetInt() == 1 then      for k, v in pairs(ents.FindByClass( "npc_grenade_frag" )) do         cam.Start3D2D(v:GetPos(), v:GetAngles(), 0.1)         if v:IsValid() then         local ESP = (v:EyePos()):ToScreen()         draw.RoundedBox( 1, 0, 0, 50, 50, Color(0,0,0,255) )         draw.SimpleTextOutlined("penis", "velmet", 0, 0, Color(255,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))         cam.End3D2D()         end         end       end     end)
edit the code and make every if statement just true, and see if it works. one or some of them probably never become true. also im not expecting a thoughfull HUD if the text is "penis"...
"penis" is just a test of this esp, so dont worry xD
3D2D functions are for 3D rendering hooks where you then start 2D rendering at the given Start3D2D position and angles, though you are using a 2D rendering hook to start 2D rendering, you probably get the problem. Here’s a list of 3D rendering hooks that you can use instead: 3D rendering hooks I suggest using PostDrawTranslucentRenderables or PostDrawOpaqueRenderables for this context.
Sorry, you need to Log In to post a reply to this thread.