Hello. Im working on a Evocity retexture addon for Gmod. I need to know, how to get custom textures working. I tryed to make the same paths like the original texture files have and just replaced the textures. It worked, but only one time. After i close Gmod or load a new addon into my gmod, my custom textures will not work anymore and i need to subscribe my addon again to get them work. So i think my problem is: I cant overwrite the textures, just add new and get them work with a lua script. I found something here on the forum and tryed it. But i get a lua error if i join my map.
This is my lua script i made, to replace a texture:
local mat = Material"hall_brick/brick01a"
local met = Material"dvm/dbrick01a"
mat:SetMaterialTexture("$basetexture", met:GetMaterialTexture"$basetexture")
Can someone help me making this texture addon?
[T]https://www2.pic-upload.de/img/33932101/21682728_1520512491367560_166646101_o.jpg[/T]
[T]https://www2.pic-upload.de/img/33932105/21684384_1520512534700889_1067242572_o.jpg[/T]
[T]https://www2.pic-upload.de/img/33932104/21684505_1520512514700891_191627118_o.jpg