Sorry I was lazy earlier.
First you’ll want a prop_physics set to the plug model and a prop_dynamic/prop_static set to the socket model. Place the socket where you want it, then place the plug in it. Copy this plug somewhere else, then make the one that is plugged in into an info_target. This way it will align correctly when teleported.
Make a trigger_teleport and set it to the info_target, set the filter to whatever you named the prop_physics.
Add an output that
ontrigger nameoftheprop disablemotion
to prevent it from moving, and also add
ontrigger nameoftrigger disable
so it doesn’t keep looping.
If you want it to be unpluggable:
On the prop_physics set the flag that says enable motion on physcannon and generate motion on USE, then add as an output to it
onplayerpickup nameoftrigger enable
If you want to be extra fancy you can throw in keyframe_rope and a move_rope to give it a cable and even an env_spark.
This is a shitty and rough explanation but my SDK is broken so I can’t just mock one up for you. This is basically the gist behind the battery and plug puzzles in HL2. I can’t remember how the EP2 one is done.