Somepotato

hax

Dec 27th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.23 KB | None | 0 0
  1. local cv=CreateConVar("cheesywallhack",0,false,false)
  2. local mat = Material("debug/debugdrawflat")
  3. local function applywep(e)
  4.     if(!e.applied) then
  5.     e.applied=true
  6.     function e:RenderOverride()
  7.         if(cv:GetBool()) then
  8.        
  9.         cam.IgnoreZ(true)
  10.             render.SuppressEngineLighting(true)
  11.             self:DrawModel()
  12.             render.SuppressEngineLighting(false)
  13.         cam.IgnoreZ(false)
  14.         else
  15.         self:DrawModel()
  16.         end
  17.     end
  18.     end
  19. end
  20. local function apply(e)
  21.     if(e.applied) then return end
  22.     e.applied=true
  23.     function e:RenderOverride()
  24.     if(cv:GetBool()) then
  25.         applywep(self:GetActiveWeapon())
  26.        
  27.         cam.IgnoreZ(true)
  28.         render.SuppressEngineLighting(true)
  29.         self:DrawModel()
  30.         render.SuppressEngineLighting(false)
  31.         cam.IgnoreZ(false)
  32.     else
  33.         self:DrawModel()
  34.     end
  35.     end
  36. end
  37. hook.Add("OnEntityCreated","apply",function(e)
  38.     if(e:IsPlayer()) then
  39.     apply(e)
  40.     end
  41. end)
  42. hook.Add("HUDPaint","apply",function()
  43.     if(!cv:GetBool()) then return end
  44.     for k,v in pairs(player.GetAll()) do
  45.     local tp=v:GetBonePosition(6):ToScreen()
  46.     draw.SimpleText(v:Name(),"Default",tp.x,tp.y-5,team.GetColor(v:Team()),TEXT_ALIGN_CENTER)
  47.     end
  48. end)
  49. for k,v in pairs(player.GetAll()) do
  50.     apply(v)
  51. end
Advertisement
Add Comment
Please, Sign In to add comment