Hey guys, in the past I have scripted for my server, but I used ClockWork HL2RP and it had it's own content autoDL plugin system. Now, I'm using DarkRP and there's nothing like that iirc, that being said, what functions would I need to use to make the person connecting automatically download something from the workshop?
This was the code I used for my CW plugin, I'm wondering would this work if I just put it in autorun? Thanks guys.
[CODE]local PLUGIN = PLUGIN;
resource.AddWorkshop("104491619");
resource.AddWorkshop("150041615");
resource.AddWorkshop("132931674");[/CODE]
GMOD by default comes with a workshop download of sorts. Just go into the garrysmod>lua>autorun then open resources.lua, just paste:
[CODE]
resource.AddWorkshop ("104491619")
resource.AddWorkshop ("150041615")
resource.AddWorkshop ("132931674")
[/CODE]
You don't need the [QUOTE]local PLUGIN = PLUGIN;[/QUOTE] or ; Afterwards. Make sure you have spaces between resource.AddWorkshop and ("21511616435")
Make sure you use GMAD Extractor on the .gma file you downloaded onto your game. Then extract and place in the garrysmod>addons.
[QUOTE=RhodesRoids;44313703]
Make sure you use GMAD Extractor on the .gma file you downloaded onto your game. Then extract and place in the garrysmod>addons.[/QUOTE]
I usually just put the contents of the addon itself in the directories, such as putting the contents of the lua file into the lua directory serverside, and the contents of models in the models directory.
[QUOTE=shadekar;44313718]I usually just put the contents of the addon itself in the directories, such as putting the contents of the lua file into the lua directory serverside, and the contents of models in the models directory.[/QUOTE]
The problem with that is that you can't remove it or edit the contents easily, you would have to find the files first, which is a pain because DarkRP tends to be very addon intensive if you want a decent server.
Edit: You probably should have posted in the "Help & Support" section.
[QUOTE=RhodesRoids;44313739]The problem with that is that you can't remove it or edit the contents easily, you would have to find the files first, which is a pain because DarkRP tends to be very addon intensive if you want a decent server.
Edit: You probably should have posted in the "Help & Support" section.[/QUOTE]
Yeah, no, I feel you, but I mean if I post the contents of the gma files in addons, will it succeed in doing the same thing if I just merge the contents of the gma file with the contents of the garrysmod directory?
[QUOTE=shadekar;44314194]Yeah, no, I feel you, but I mean if I post the contents of the gma files in addons, will it succeed in doing the same thing if I just merge the contents of the gma file with the contents of the garrysmod directory?[/QUOTE]
I've never tried merging an addon with the garrysmod folder but I suppose it might work. However the models and such probably won't be under the addons section in Q Menu.
If you use the
+host_workshop_collection ### -authkey XXX
arguments when launching your server, then use this:
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/content_and_resources/download_workshop_content.lua[/url]
It'll automatically add all addons the server is subscribed to the client for download. Additionally, there's commented out code which shows that it's possible to view all files and folders within an addon.
use the [B]v.title[/B] in the for-each loop of for k, v in pairs( engine.GetAddons( ) ) do -- as a replacement to [B]"MOD" / "DATA"[/B] etc positions / the second argument of file.Find in order to list all the files / folders. If it contains any map files then skip adding it as those are automatic when the map is running.
Rhodes, I'm having some issues, do you mind if I message you?
[QUOTE=shadekar;44316540]Rhodes, I'm having some issues, do you mind if I message you?[/QUOTE]
Fire away.
[QUOTE=RhodesRoids;44317125]Fire away.[/QUOTE]
Alright, it says you are unable to recieve PMs so would you mind sending me a request over steam?
[url]http://steamcommunity.com/id/blaxploitation[/url]
I have a TS3 I can give you the IP to if you'd rather talk than type.
Sorry, you need to Log In to post a reply to this thread.