Advertisement
CapsAdmin

Untitled

Apr 24th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local mat = CreateMaterial("asodkaosd_" .. os.clock(), "UnlitGeneric")
  2.  
  3. mat:SetTexture("$basetexture", Material("models/barnacle/roots"):GetTexture("$basetexture"))
  4.  
  5. local scale = Vector(1,1)
  6. local offset = Vector(0,0)
  7. local center= Vector(0.5, 0.5)
  8. local rotate = Angle(50, 523)
  9.  
  10. hook.Add("HUDPaint",1,function()
  11.     mat:SetString("$basetexturetransform", ("center = %f %f translate %f %f scale %f %f rotate %f %f"):format(center.x, center.y, offset.x, offset.y, scale.x, scale.y, rotate.p, rotate.y))
  12.    
  13.     surface.SetDrawColor(255, 255, 255, 255)
  14.     surface.SetMaterial(mat)
  15.     surface.DrawTexturedRect(0,0, 256,256)
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement