• Help with setting up a basic server using workshop
    5 replies, posted
Hi! I configured a server using steamCMD today and I basically want a server to play Prop Hunt, Hide and Seek and Murder, and they are all added to a collection I have public in workshop including some maps. I'm using a start.bat file in the srcds.exe folder to start the server with the following lines: @echo off cls echo Protecting srcds from crashes... echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter. title srcds.com Watchdog :srcds echo (%time%) srcds started. start /wait srcds.exe -console -game garrysmod +maxplayers 8 +gamemode murder +map gm_housewithgarden +host_workshop_collection COLLECTIONID -authkey AUTHKEYID goto srcds However, I want it to call on stuff from the workshop collection I have instead of having it on my computer? I have read about adding commands like +workshop_start_map COLLECTIONID and +host_workshop_map COLLECTIONID but nothing seems to be able to call on a map. The same with gamemode, is there something like +host_workshop_gamemode COLLECTIONID to call on a gamemode from workshop? If this is not possible and I have to have the server including maps and gamemodes on my server, is there any good way to get it from workshop to my servers map and gamemode folder than the GMAD extractor that only takes one file at the time (thinking about maps here mostly). Shall I add something specific to server.cfg? Only things I have there now are rcon passwords and server password and server name. It would be awesome if you could compose a basic start.bat file and server.cfg to add these if its not too time consuming! Thanks for your time! EDIT: I've heard about something resources.AddWorkshop(COLLECTIONID) in a .lua file, how do you do this? EDIT2: It is an anonymous server btw:)
It's workshop.lua create a new file in gmod/lua/autorun/server
[QUOTE=Lord_TAcoz;46638812]It's workshop.lua create a new file in gmod/lua/autorun/server[/QUOTE] Ah great, thanks! Any pointers on what I could do to call on maps and gamemodes from workshop to work on the server? And how to switch gamemode through console command in the game? I am able to change map through rcon changelevel MAPNAME but the command gamemode prop_hunt for example wont start, even though I have it in my server folder and not on workshop?
Make sure the collection is linked. Collection calls addons to the server, workshop.lua sends it to client
[QUOTE=Lord_TAcoz;46644280]Make sure the collection is linked. Collection calls addons to the server, workshop.lua sends it to client[/QUOTE] and by linked you mean the commandline in start.bat? the host_+host_workshop_collection?
[QUOTE=hugol0l;46639364]Ah great, thanks! Any pointers on what I could do to call on maps and gamemodes from workshop to work on the server? And how to switch gamemode through console command in the game? I am able to change map through rcon changelevel MAPNAME but the command gamemode prop_hunt for example wont start, even though I have it in my server folder and not on workshop?[/QUOTE] I think there's a several tutorial on that hugo . I don't think you can switch gamemode through console command though. But I do know that you can change map.
Sorry, you need to Log In to post a reply to this thread.