Advertisement
Guest User

Untitled

a guest
May 29th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. include('shared.lua')
  2.  
  3. function npcaddons ( ply )
  4.  
  5. local DermaPanel = vgui.Create( "DFrame" )
  6. DermaPanel:SetTitle( "Les addons c'est ici !" )
  7. DermaPanel:SetSize( 250, 200 )
  8. DermaPanel:SetPos( 200 )
  9. DermaPanel:MakePopup()
  10.  local DermaButton = vgui.Create( "DButton" )
  11.  DermaButton:SetParent ( DFrame )
  12.  DermaButton:SetText( "Addons !" )
  13.  DermaButton:SetPos( 25, 52 )
  14.  DermaButton:SetSize( 125, 30 )
  15.  DermaButton.DoClick = function()
  16.  gui.OpenURL("http://steamcommunity.com/sharedfiles/filedetails/?id=628661338")
  17. end
  18.  
  19.  
  20.  
  21. end
  22.  
  23. usermessage.Hook("npcaddons", npcaddons)
  24.  
  25. hook.Add("PostDrawOpaqueRenderables", "npcaddons", function()
  26.     for _, ent in pairs (ents.FindByClass("npc_basic")) do
  27.         if ent:GetPos():Distance(LocalPlayer():GetPos()) < 1000 then
  28.             local Ang = ent:GetAngles()
  29.  
  30.             Ang:RotateAroundAxis( Ang:Forward(), 90)
  31.             Ang:RotateAroundAxis( Ang:Right(), -90)
  32.  
  33.             cam.Start3D2D(ent:GetPos()+ent:GetUp()*79, Ang, 0.20)
  34.                 draw.SimpleTextOutlined( 'Les Addons', "HUDNumber5", 0, 0, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  35.             cam.End3D2D()
  36.         end
  37.     end
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement