Prevent npc from dying after ragdolling

Hello anyone know how to prevent npc from dying after ragdolling? it’s not fun to have a boss that dies instantly from 10k hp after just ragodolling :frowning:

You can try:

SetPedConfigFlag(ped, 281, true)

If you don’t mind me asking, why is the boss dying?
Also, what’s the source of the ragdoll / writhe?

You may also be able to set ped config flag 347 which makes the ped only writhe from weapon damage, but that depends on factors such as what ped you’re using, how they’re ragdolling, your intention, and how they’re dying…

SetPedConfigFlag(ped, 347, true)