How do you stop workshop stuff from being spawned in a server?
5 replies, posted
Need to know as all people seem to do is spawn workshop crap on my server. I'd rather people use advanced dupe and spawn their own stuff.
If you have FPP or similar installed on your server there's a convenient option to restrict tools by rank / individual user's, so setting the 'duplicator' tool to superadmin only works well, I'm pretty sure there's another way via commenting out a few lines somewhere, but it's been a long time and my memory isn't very good.
I always just use toolmode_allow_duplicator 0
For the sake of re-typing.
Posted this in a few similar threads a while back, its not 100 percent fool proof, but it will stop the majority of people who community dupes and still allow the use of the regular dupe for saving and loading local dupes.
[QUOTE=TornadoChas3r;40592954]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. [/QUOTE]
The way I did it, I had an addon called SooperDooper which would viewpunch the player, do 10 damage, and spam obnoxious rainbow text telling them that dupe tool is disabled
[QUOTE=BFG9000;42532328]The way I did it, I had an addon called SooperDooper which would viewpunch the player, do 10 damage, and spam obnoxious rainbow text telling them that dupe tool is disabled[/QUOTE]
That's probably the most effective way.
Sorry, you need to Log In to post a reply to this thread.