HUD Help ;-;

Hey guys so I’m working on a pretty simple hud and I was wondering how to do three things.

  1. How do I get a player’s name into the hud ( I was thinking GetName or Nick but those spat loads of errors at me )

  2. How do I get a player’s model into the hud ( I read somewhere that I would have to do it w/ derma but I have no idea how)

  3. How do I get a player’s avatar into the hud. ( No clue about this one lol )

Thanks in advance (:

  1. It is Nick

2 ) GetModel / you could use DModelPanel and ParentToHUD ( be sure to keep track of the variable because you’ll never be able to remove it otherwise because the children function doesn’t get vgui elements parented to hud: https://dl.dropboxusercontent.com/u/26074909/tutoring/_utilities/concommand_clearvgui.lua

3 ) VGUI again, AvatarImage or so.

Make sure you check the mandatories ( LocalPlayer( ) isn’t available for use for the first few frames that HUDPaint executes ): https://dl.dropboxusercontent.com/u/26074909/tutoring/hud/proper_hud_creation.lua.html

Thanks for the help I got the name working!

Now I’m having this other issue. My HUD is making me run out of memory wtf ._.

Fixed above issue w/ help from Acecool :slight_smile:

Had to put surface.CreateFont in Initialize :stuck_out_tongue:

Hey guys I have another question.

I was wondering how to get a player’s ulx rank and put it on the hud.

Also, would there be a way to put a circle around the player’s avatar and have it crop out everything outside the circle?

Also, here’s my progress :slight_smile:

Are you creating a font inside the hud function that is bring called every frame?

That issue was already addressed thx though :slight_smile:

Bump

Still need a way to get player ranks and display them. Any ideas anyone?
Thanks :stuck_out_tongue:

LocalPlayer():GetUserGroup()

Not sure why that didn’t work earlier I was getting an error before ._.

Thanks though!

Lastly, is there a way to put a circle around a player’s avatar and crop everything on the outside of it?

http://forum.facepunch.com/showthread.php?t=1411111&p=47276648&viewfull=1#post47276648