*Re-done entire thread; learned stuff by reading the replies*
Please bump this thread when you’re done reading, so other people can see this thread!
**The Wiki: **[Resource.AddFile
In this thread, I’ll be covering, how you make players who connect to your server, download stuff if they dont have it :eng101:
1 - Lets Get Started
Navigate to your garrysmod/garrysmod/lua/autorun/server folder (Incase you dont have the “autorun” or the “server” folder, simply create those), right click and make a new text document.
2 - The Coding
The coding, or whatever you want to call it, is extremely easy to do here, simply write:
If the player, who connected to your server, doesent have the barney.mdl file, he will download the 6 model files.
Now, to make them see the model, you have to add the materials (.vtf) files:
And; if you’re running a map, which arent a standard map, you can make them download that too!
3 - Saving The File
Hit “Save as…” and name it resource.lua, and put it into your garrysmod/lua/autorun/server folder.
4 - Done!
That’s actually it! Just restart your server and whenever people connect to your server, without having the barney model, they will download all the 6 model files + the materials for him.
5 - Addition
You can also use the AddDir Command, which makes them download the whole directory.
I’m sorry, but I’m not able to explain what it does, cause I… well, cant :doh:
Resource Script Generator
Credits to Kogitsune for making it