can somebody show me the proper way to import custom vtf through addons and gamemode..i want to make custom hud to my new gamemode but always got black/purple texture..thank you
You can use a .png instead
Through addons, put your materials in addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png
Remember to add them before using them
[lua]resource.AddSingleFile( "addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png" )[/lua]
For gamemodes:
garrysmod/gamemodes/YOURGAMEMODE/content/materials/vgui/ANYFOLDER/yourpicture.png
And you have to add that with its path as well.
You don't have to include the file extension, thats just optional.
I hope this helped.
[QUOTE=Skere_;49286602]Through addons, put your materials in addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png
Remember to add them before using them
[lua]resource.AddSingleFile( "addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png" )[/lua]
For gamemodes:
garrysmod/gamemodes/YOURGAMEMODE/content/materials/vgui/ANYFOLDER/yourpicture.png
And you have to add that with its path as well.
You don't have to include the file extension, thats just optional.
I hope this helped.[/QUOTE]
well why must i put the material into that vgui path lol
[QUOTE=Skere_;49286602]Through addons, put your materials in addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png
Remember to add them before using them
[lua]resource.AddSingleFile( "addons/ADDONNAME/materials/vgui/ANYFOLDER/yourpicture.png" )[/lua]
For gamemodes:
garrysmod/gamemodes/YOURGAMEMODE/content/materials/vgui/ANYFOLDER/yourpicture.png
And you have to add that with its path as well.
You don't have to include the file extension, thats just optional.
I hope this helped.[/QUOTE]
you do not need addons/ADDONNAME/ in the addsinglefile all folders inside of an addon folder are mounted to the root directory on server start
[editline]10th December 2015[/editline]
resource.AddSingleFile( "materials/yourpicture.png" )
will work just the same if you just want to toss it in your materials folder inside of your addon
[QUOTE=kulcris;49286989]you do not need addons/ADDONNAME/ in the addsinglefile all folders inside of an addon folder are mounted to the root directory on server start
[editline]10th December 2015[/editline]
resource.AddSingleFile( "materials/yourpicture.png" )
will work just the same if you just want to toss it in your materials folder inside of your addon[/QUOTE]
It works fine anyway, I have no clue why people spam dumb ratings for everything they do differently. I just tried to help and shared the way I did it.
If you do it differently, cool, but don't start hating.
[QUOTE=Skere_;49287495]It works fine anyway, I have no clue why people spam dumb ratings for everything they do differently. I just tried to help and shared the way I did it.
If you do it differently, cool, but don't start hating.[/QUOTE]
He is not hating.
He is just giving advice.
If you change the addons folder name it will no longer work.
Just that
its also going to act weird, the addon will download the file to a folder that it is not suppose to.
any time you use a material it should not direct to the addon folder but instead to the materials folder (since that is where the file actually is) unless of course you want to have your material in
addons/blah/addons/blah/materials/yourmat.png
ok tq guys
So we are trying to help you and telling you how to make your code better and you rate us dumb?
Also for giving you advice?
Are YOU dumb?
Beacouse thats not the way to say people thanks.
[editline]11th December 2015[/editline]
I was talking abour Skere_
Sorry, you need to Log In to post a reply to this thread.