Hi guys
I'm trying to make my own garry's mod darkrp server
Currently my task is to make custom job with custom model
But the problem is that i can't download some custom content directly from the server
According to answer in Adding Playermodels to custom jobs i have to just put mod into garrysmod/addons folder and client should download it while connecting, but it doesn't happens for some reason.
My sv_allowdownload is 1 and i can see the mod in my server log
https://files.facepunch.com/forum/upload/133866/e4244f05-0309-402e-8bd4-bf262fe3fa52/screenshot.png
Also i know that it's possible to make players download mods via workshop, but they're downloading as package and i dunno how to use em in my configs.
You have to use resource.AddFile, create a file lua/autorun/server/whatever.lua and call it for each file you need players to download. Regarding workshop addons: Workshop for Dedicated Servers
I've finally figured out how it works.
Create collection and host it.
Add all of mods into autorun by resource.AddWorkshop("string id")
Spawn newly added models and you'll get the full path to models in your client(game) console.
Is there more correct ways to do 3 step?
There are some content that you shouldn't put on the workshop like: private add-ons or paid add-ons.
Workshop is your fastest means of client downloads. Second, is Fastdl. Resource.addfile () will send the file to the client through downloading from the server and .addworkshop () through the workshop. Just because fastdl is it's name doesn't mean it's fast by anymeans.
Sorry, you need to Log In to post a reply to this thread.