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 :)
For using images with derma you can use either [URL="http://wiki.garrysmod.com/page/Category:Material"]Material[/URL] or [URL="http://wiki.garrysmod.com/page/Category:DImage"]DImage[/URL]. For drawing images you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawTexturedRect]surface.DrawTexturedRect[/url].
Steam avatars are a maximum of 184x184 pixels, meaning if you go over that or don't maintain the ratio they will look stretched.
[QUOTE=txike;52604028]For using images with derma you can use either [URL="http://wiki.garrysmod.com/page/Category:Material"]Material[/URL] or [URL="http://wiki.garrysmod.com/page/Category:DImage"]DImage[/URL]. For drawing images you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawTexturedRect]surface.DrawTexturedRect[/url].
Steam avatars are a maximum of 184x184 pixels, meaning if you go over that or don't maintain the ratio they will look stretched.[/QUOTE]
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/".
[QUOTE=txike;52604118]Put your images in "garrysmod/materials/".[/QUOTE]
Does this work for other servers? i want to set this addon public.
[QUOTE=E-Servers;52604120]Does this work for other servers? i want to set this addon public.[/QUOTE]
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)
Sorry, you need to Log In to post a reply to this thread.