Hey there. I run a sandbox server and dupes can mess everything up.
Is it possible to turn them off?
Yes, somewhere in the base sandbox files, try to google for it.
If you're taking about the community workshop dupes, there is a way to disable it and still allow the use of the regular duplicator tool for local saves and such ( unless you wanted to block those as well ). Although anyone who knows a bit of lua could bypass this, but I don't think most people who use workshop dupes will try.
[QUOTE=TornadoChas3r;38521864]I've just been adding a simple if then to the DownlodAndArm function, just checking if the player is in a certain group, could do what ever check you wanted, just return false to prevent them from downloading. This could be a half-assed way of doing it, but it works.. and still allows the use of the tool and for saving and using local dupes clients may have.. just not any of the community saves.
Just edit the DownloadAndArm function on
[b]gamemode/spawnmenu/creationmenu/content/contenttypes/dupes.lua[/b] starting on line 55
[lua]function ws_dupe:DownloadAndArm( id )
if LocalPlayer():EV_GetRank()=="guest" then /* Check the player for what ever, could use GetNWString( "usergroup"), ulx functions or what ever could even go crazy and ask the server first */
chat.AddText( ply, Color( 255, 0, 0 ), "Sorry, community dupes are blocked for Guests, Only Regular members or higher may use this")
return false
else
MsgN( "Downloading Dupe...\n" )
steamworks.Download( id, true, function( name )
MsgN( "Finished - arming!\n" )
ws_dupe:Arm( name );
end )
end
end
[/lua]
I don't think this method the the safest way, but it will stop the majority, you will need to update this file each time GMod is updated as well[/QUOTE]
You can do what ever check you want, against an admin mod or a white list of your own etc.
You might be able to overwrite the DownloadAndArm function later on after the server starts, so you don't have to update that file each time you update GMod, but I haven't bothered to try it.. just an idea.
Sorry, you need to Log In to post a reply to this thread.