Picture in HUD

Dear Readers,

Ive been using lua for sometime now, but i still don’t know how to put a picture in lua.
I want to use my own custom picture. I saw some scripts but it keep getting purple and black boxes.

Also if i want to put someones steam profile picture in and want to make it bigger the profile picture is so stretched. Someone knows a solution?

Thank you :slight_smile:

For using images with derma you can use either Material or DImage. For drawing images you can use

surface.DrawTexturedRect.
Steam avatars are a maximum of 184x184 pixels, meaning if you go over that or don’t maintain the ratio they will look stretched.

The derma works, but where do i need to put the picture? because it’s just purple and black boxes.

Put your images in “/materials/”.

Does this work for other servers? i want to set this addon public.

If you publish the addon with the picture then yes
Just make sure it’s in addon_folder/materials (with addon_folder replaced with whatever folder you’re using for your addon’s files)