Overriding death ragdolls?

I’m trying to replace death ragdolls with my own entities, kind of like dismemberment mod, except to achieve a different end.
However, hooking Create Clientside Ragdoll fails to remove aforementioned ragdoll.

I checked dismemberment mod itself but I haven’t been able to figure out what the guy actually does to override the default ragdoll, from the looks of it he doesnt hook anything.

Can someone help me out?

Name: gamemode:DoPlayerDeath( )
Desc: Carries out actions when the player dies
function GM:DoPlayerDeath( ply, attacker, dmginfo )


ply:AddDeaths( 1 )

if ( attacker:IsValid() && attacker:IsPlayer() ) then

	if ( attacker == ply ) then
		attacker:AddFrags( -1 )
		attacker:AddFrags( 1 )



Just modify the “CreateRagdoll()” part.

Hmm, so it never activates a hook, then?

And I suppose I’d do something similar for NPCs?

[editline]27th February 2014[/editline]

also it doesn’t say on the wiki but does CreateRagdoll return the ragdoll entity it created?

I assume it creates a ragdoll only. http://wiki.garrysmod.com/page/Player/CreateRagdoll

Also I noticed there is another function, altho I am not sure if it works:
Name: gamemode:CreateEntityRagdoll( entity, ragdoll )
Desc: A ragdoll of an entity has been created
function GM:CreateEntityRagdoll( entity, ragdoll )

Yeah, I know about that one but havent gotten around to testing it.