• Surface material help pless
    2 replies, posted
[CODE]code removed[/CODE] Wy dosent the material work pless help.
I think you need to add "noclamp" as a 2nd parameter to Material() when using png images. I can't post a source but I remember reading it somewhere -- thought it was the old GMod wiki, but I guess not. The new wiki shows the various parameters: [url]http://wiki.garrysmod.com/page/Global/Material[/url] [CODE]surface.SetMaterial( Material( "rrroleplay/gangtest.png", "noclamp" ) )[/CODE] You may also want to store that material outside of the ENT:Draw() function so you aren't recreating the Material so much. [CODE]local mat = Material( "rrroleplay/gangtest.png", "noclamp" ) function Ent:Draw() -- stuff surface.SetMaterial( mat ) -- stuff end [/CODE]
[QUOTE=Mista Tea;44551569]I think you need to add "noclamp" as a 2nd parameter to Material() when using png images. I can't post a source but I remember reading it somewhere -- thought it was the old GMod wiki, but I guess not. The new wiki shows the various parameters: [url]http://wiki.garrysmod.com/page/Global/Material[/url] [CODE]surface.SetMaterial( Material( "rrroleplay/gangtest.png", "noclamp" ) )[/CODE] You may also want to store that material outside of the ENT:Draw() function so you aren't recreating the Material so much. [CODE]local mat = Material( "rrroleplay/gangtest.png", "noclamp" ) function Ent:Draw() -- stuff surface.SetMaterial( mat ) -- stuff end [/CODE][/QUOTE] I did what u said but some how the picture only apears when i press a button in the f4 menu + i use this fore a entitie
Sorry, you need to Log In to post a reply to this thread.