Discussion in 'Mapping Questions & Discussion' started by Sir Tin, Aug 15, 2014.
Is there anyway to make a Door that only admins may access or a teleporter of some sorts?
Other than giving it a keypad of sorts that you have to enter a code to use (or something similar), you're probably going to have to use a plugin of some kind.
Admins should be able to use noclip, though. You can always just not build a way in at all.
have a func_button that only the admin knows about, then give it OnDamaged | !activator | TargetName | Clive and set it to only once. You'll need a filter_activator_name, call it filter_clive and set the filter name to Clive. Then on the door's trigger set the activation filter to filter_clive. Now only the first person to shoot that button will be able to open the door. (Anyone will be able to walk through, but only they'll be able to open it)
You can make this harder for people to figure out by using triggers so players have to stand in the right place to shoot the button, or outputs to enable/disable the button so they have to do it quickly, or by adding more buttons that enable each other in sequence.
Or just ask the admin to ent_fire an Open input to the door entity.
That requires sv_cheats to be 1, which means regular players can do all sorts of abuse, like toggling noclip on themselves.
A SourceMod plugin is probably the best option, less hacking involved, and it could be used on any map.
I found a page on the Allied Modders (SourceMod) forum that has a brief plugin that can set the targetname of a SourceMod admin to 'donator'. Of course, you could change that to whatever you wanted, and use the filter logic YM suggested. It would be automatic, without risk of players finding the secret button, but server operators would need to install the plugin.
It's from January 2012, though, so it may be a bit out of date. Fingers crossed!
The problem with buttons and triggers would be that somebody could just decompile the map and find out all of that.
The plugin that worMatty linked is probably the only save method.
Separate names with a comma.