Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. cl_init.lua :
  2.  
  3. include('shared.lua')
  4.  
  5. function welcome( ply )
  6.  
  7. ply = LocalPlayer
  8. chat.AddText(Color(255,0,0) "Hello",Color(255,255,255), ply, Color(255, 0, 0), "welcome to my serveur")
  9.  
  10. end
  11.  
  12. usermessage.Hook("welcome", welcome)
  13.  
  14. hook.Add("PostDrawOpaqueRenderables", "welcome", function()
  15. for _, ent in pairs (ents.FindByClass("npcwelcome")) do
  16. if ent:GetPos():Distance(LocalPlayer():GetPos()) < 1000 then
  17. local Ang = ent:GetAngles()
  18.  
  19. Ang:RotateAroundAxis( Ang:Forward(), 90)
  20. Ang:RotateAroundAxis( Ang:Right(), -90)
  21.  
  22. cam.Start3D2D(ent:GetPos()+ent:GetUp()*79, Ang, 0.20)
  23. draw.SimpleTextOutlined( 'welcome', "HUDNumber5", 0, 0, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0, 0, 0, 255))
  24. cam.End3D2D()
  25. end
  26. end
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement