Stop Ragdoll Creation

How would I prevent a ragdoll from being created when I kill an NPC? I’m working on a game mode that will involve many many dead NPCs and I want them to just disappear when killed. Any help is appreciated.

You could always use the “g_ragdoll_maxcount” cvar.

if (ent:GetClass() == “prop_ragdoll” or ent:GetClass() == “class C_ClientRagdoll”) then
SafeRemoveEntityDelayed(ent,0) --makes it remove next frame, they say entities aren’t really valid in this hook

[editline]12th January 2011[/editline]

Put it in lua/autorun/whatever.lua

thank you very much, it works great, I thought I looked though all the hooks but I must have missed that one.