• Does sending materials to clients work?
    3 replies, posted
I have tried using both resource.AddSingleFile and resource.AddFile to send VMT/VMF files to the client, but my friend says that he still sees purple/black checkerboards for the textures. Is there something else I need to use or check before a client can see materials properly?
resource.AddSingleFile("materials/stuff/image.vmt") resource.AddSingleFile("materials/stuff/image.vtf") Should run server side and have the files on the server. That's the only stuff you need to know. Check for misspelling
Sorry, just brain farted and forgot the actual name of the materials. I can confirm that the materials are being sent to the client now, but for some reason he can't load them in the SWEP I am creating. I have the SWEP under addons/swep_name/lua/weapons/shared.lua I have my materials in addons/swep_name/materials/*.vtf In the SWEP code I initialize materials like Material('materials/material_name') - they show up for me but not for him, he says he just sees checkerboard textures. Is this an issue of inconsistent file directories between us? Since when he downloads the materials, I'm not sure if he is able to access the relative file directory 'materials/material_name' the same way I am. How can I develop this locally without having him use an addon?
Resolved: I used F0x's resource generator. Looks like I shouldn't have the addon/ prefix for relevant materials.
Sorry, you need to Log In to post a reply to this thread.