• resource.AddFile confusion
    3 replies, posted
I'm trying to send a material file that's in my gamemode's content folder to clients so they don't see a huge purple and black square covering a fourth of the screen, but the resource.AddFile() page on the gmod wiki says: [quote="Gmod Wiki"]This will NOT send files that are in a gamemode's content folder. You must copy them into the root folder for this to work.[/quote] So is it impossible to do this with materials in your gamemode folder? Or am I meant to use lua to copy them into the root folder? If that's the case, then how? Thanks.
That's wrong? Inside a gamemode, it treats the content folder as a part of the root folder. So if you have a material at gamemodes/your_gamemode/content/materials/mat.vmt Then in your init.lua you can do [code]resource.AddFile("materials/mat.vmt")[/code]
This is the same for addons aswell I believe
Thank you both.
Sorry, you need to Log In to post a reply to this thread.