• Players info above the head
    4 replies, posted
Hey, I'm currently working on a custom hud for my darkrp server. I've done everything but the players info above their heads. I just want it to show the basic things, health, job, name, gun license, and wanted. Is there a template? how do you start doing it?
I found this a while back Useful Code Snippets The very first post shows some code to do exacly that. Might helps you
I will just leave this here in case you need it. DarkRP HUD.lua
If you need 3D2D text above player head, this can help function GM:PostPlayerDraw(player)     if not player:IsValid() then return end     if not player:Alive() then return end     if player == LocalPlayer() then return end     if LocalPlayer():GetPos():Distance(player:GetPos()) < 512 then         local pos = player:LocalToWorld(Vector(0, 0, 80))         local ang = LocalPlayer():GetAngles()         ang:RotateAroundAxis(ang:Forward(), 90)         ang:RotateAroundAxis(ang:Right(), 90)         cam.Start3D2D(pos, ang, 0.15)             draw.SimpleTextOutlined(player:Nick(), "OverheadFont1", 0, 0, Color(255, 255, 255), 1, 1, 1, Color(0, 0, 0))             draw.SimpleTextOutlined(player:getDarkRPVar("job"), "OverheadFont2", 0, 25, team.GetColor(player:Team()), 1, 1, 1, Color(0, 0, 0))         cam.End3D2D()     end end But you need change function GM: to hook.Add and Distance to DistToSqr (Distance method is way more expensive than DistToSqr)
You are a legend. Thank you so much. Thanks to everyone else, this one got it. I appreciate that so much man, thanks!
Sorry, you need to Log In to post a reply to this thread.