I know I made a thread yesterday about C++ scripting, but as a beginner I am trying to learn C# as well. Wasn't sure if I should place this in that thread or if I should create a new thread in here.
There is a script idea that I am trying to learn how to do. It is based off of the death script that the GTA DOJ role players recently introduced, that I would really like to have for my own game.
Basically I want the ability to get killed without going through the "wasted" screen.
1) A health variable
2) If I am hit by a weapon, I lose a certain amount of health.
3) if my health variable reaches 0, I go into ragdoll mode with the option to re-spawn and come back to life.
What I can't seem to find in the Script hook V dot net object browser, is an option to active ragdoll. I can see the Ped.CanRagdoll boolean, found the Ped.IsRagdoll boolean, which is a read-only variable. How do I activate ragdoll mode?
I hate to ask for a complete script, but I have looked around youtube videos, the wiki, and tried to download mods(but source code is usually hidden) without much like, so if anyone is bored, any code would be appreciated.