daily pastebin goal
15%
SHARE
TWEET

cl_init

a guest Jun 19th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include("shared.lua")
  2. AddCSLuaFile()
  3. local thisent
  4. local text = SMS.LangTab["Refinery"]
  5. local font = "Default"
  6.  
  7. function ENT:Draw()
  8.     self.Entity:DrawModel()
  9.     local textw, texth = surface.GetTextSize( text )
  10.     local w = 5 + textw + 5
  11.     local h = 2 + texth + 2
  12.     local x, y = -w / 2, -h / 2
  13.        
  14.     local offset = Vector( 0, 0, 90 )
  15.     local ang = LocalPlayer():EyeAngles()
  16.     ang:RotateAroundAxis( ang:Forward(), 90 )
  17.     ang:RotateAroundAxis( ang:Right(), 90 )
  18.     local pos = self:GetPos() + (self:GetAngles():Up() * 90)
  19.     cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 )
  20.             surface.SetFont( font )
  21.             surface.SetDrawColor( Color( 0, 0, 0, 200 ) )
  22.             surface.DrawRect( x, y, w, h )
  23.             draw.SimpleTextOutlined( text, font, 0, 0, Color( 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 0, 0, 0 ) )
  24.     cam.End3D2D()
  25.  
  26. end
  27.  
  28. function ENT:Think()
  29.     self:PhysicsInit(SOLID_VPHYSICS)
  30. end
RAW Paste Data
Top