Smart no collide system while physgunning a prop?

Hey guys, do you have any idea how to code this:

Essentially, I’ve made a SENT. This SENT has collisions, in any normal circumstance. However, I want to make it so that if a player grabs something with his physgun, that grabbed object no longer collides with the SENT I’ve coded, but still collides with everything else.

This would prevent prop pushing.

Anyone have any idea how to code this / help me get started?

You can use this hook: http://wiki.garrysmod.com/page/GM/PhysgunPickup to detect when player pickups an entity, and then use this hook: http://wiki.garrysmod.com/page/GM/ShouldCollide to make it nocollide with your SENT.

Thank you!

I have a question for you though, what are you going to do when players try putting smaller props inside of bigger props and letting go with the phys gun to have them explode in chaos? Just an issue I thought of when thinking about the same problem, figured I would let you know.

I guess I would have to check for all constrained entities to the original entity that is being physgunned. Is there any way to do this?

[editline]31st May 2013[/editline]

I’m having trouble telling the second hook the entity from the first. Can you put one hook inside another? If not, how would I do this?