Disabling physgun for Ragdolled Player

Two questions actually. >_>

One is disabling the physgun for a ragdolled player…
And the second is enabling the use key to drag a ragdolled player about. >_>

I have no idea where to start with those. A push in the right direction would be helpful, for the physgun I have no clue how to let it know that this is a player ragdoll don’t touch it…

[lua]function knockout.ragdoll( targetply )
if ( SERVER ) then
local ragdoll = ents.Create( “prop_ragdoll” )
local ragdoll.id = targetply:SteamID()
ragdoll:SetPos( targetply:GetPos() )
local velocity = targetply:GetVelocity()
ragdoll:SetAngles( targetply:GetAngles() )
ragdoll:SetModel( targetply:GetModel() )
ragdoll:Spawn()
ragdoll:Activate()
targetply:SetParent( ragdoll )
// Setting velocity for all physics objects on ragdoll
local j = 1
while true do
local phys_obj = ragdoll:GetPhysicsObjectNum( j )
if phys_obj then
phys_obj:SetVelocity( velocity )
j = j + 1
else
break
end
end

	targetply:Spectate( OBS_MODE_CHASE )
	targetply:SpectateEntity( ragdoll )
	targetply:StripWeapons()
	targetply:ConCommand("pp_motionblur 1")
	targetply:ConCommand("pp_motionblur_addalpha 0.06 ")
	targetply:ConCommand("pp_motionblur_delay 0")
	targetply:ConCommand("pp_motionblur_drawalpha 0.99 ")
	
	ragdoll:DisallowDeleting( true, function( old, new )
		targetply.ragdoll = new
	end )
	targetply:DisallowSpawning( true )
end

end[/lua]

[lua]local function PreventRagdollPickup( ply, ent )

if ent:GetClass() == "prop_ragdoll" and ent.id then

    return false
end

end
hook.Add( “PhysgunPickup”, “PreventRagdollPickup”, PreventRagdollPickup )[/lua]

As for your second issue, I think you want to use **[Gamemode.KeyPress

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.KeyPress)**, check if the entity the player’s looking at is a player ragdoll (like above) and then use **[Gamemode.Move

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.Move)** to move the ragdoll with the player.