Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. surface.CreateFont("PlayerFont", {size = 36, weight = 0, font = "Calibri Light"})
  2.  
  3. function DrawName( ply )
  4.  
  5.     if !ply:Alive() then return end
  6.  
  7.     local offset = Vector( 0, 0, 85 )
  8.     local ang = LocalPlayer():EyeAngles()
  9.     local pos = ply:GetPos() + offset + ang:Up()
  10.  
  11.     ang:RotateAroundAxis( ang:Forward(), 90 )
  12.     ang:RotateAroundAxis( ang:Right(), 90 )
  13.  
  14.     cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 )
  15.         draw.DrawText( ply:GetName(), "PlayerFont", 2, 2, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
  16.     cam.End3D2D()
  17.  
  18. end
  19.  
  20. hook.Remove("PostPlayerDraw", "DrawPlayerInfo")
  21. hook.Remove("PostPlayerDraw", "KBW_DrawPlayerInfo")
  22. hook.Add("PostPlayerDraw", "KBW_DrawPlayerInfo", function(ply)
  23. hook.Add( "PostPlayerDraw", "DrawName", DrawName )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement