Two questions

1: How do I make a server-side ragdoll for player and NPCs and remove the client one? Also, can I make it that player cannot collide with said bodies?
2: Can I make a growing pool of blood under said bodies somehow?

Spawn prop_ragdoll, set the player model to the new entity, etc on PlayerDeath. Also look at copying the bones from the player to the ragdoll ( so the rag falls from where the player stood; take a look at how TTT does it in their corpse Lua files ).

Set the collision group to debris trigger: _ragdoll:SetCollisionGroup( COLLISION_GROUP_DEBRIS_TRIGGER ); – which will allow players to walk through, doors should move through them too, but they can still be targeted, etc…

  1. Yeah, you can either use decals, or make an effect for it.

How do I delete the clientside ragdoll? On Player Death? I need the decal to get larger as time passes.

To adjust the size of the decal, you’d need to create a custom decal system as the current one doesn’t support access to laid decals. You could overwrite the material $basetexture, but it’d make ALL of them change unless you reset after viewing that particular one.

To remove the clientside ragdoll… which game-mode are you running? A lot of custom game-modes overwrite PlayerDeath, etc which should prevent it.

This hook is run on creation of the ragdoll, you could SafeRemoveEntity inside a hook.Add:


--[[---------------------------------------------------------
   Name: gamemode:CreateEntityRagdoll( entity, ragdoll )
   Desc: A ragdoll of an entity has been created
-----------------------------------------------------------]]
function GM:CreateEntityRagdoll( entity, ragdoll )
end

But, usually it is created in PlayerDeath or thereabouts… The call should be easy enough to find and prevent.