lunchxbles 423 Posted May 5, 2015 (edited) I recently made a mod that allows the player to fall along with everyone around him, the issure that I am having is that I am trying to add a toggle feature to the ragdoll but when ingame all this code does is make the player fall and get right back up. else if (ENTITY::DOES_ENTITY_EXIST(peds[offsettedID])) { bool value = false; if (GetAsyncKeyState(0xDB)) { value = true; } if (value) { PED::SET_PED_CAN_RAGDOLL(playerPed, TRUE); PED::SET_PED_TO_RAGDOLL(playerPed, 0, 0, 0, TRUE, TRUE, TRUE); } Thanks for the help. Edited May 5, 2015 by lunchxbles Quote Share this post Link to post Share on other sites
BenBaron 21 Posted May 6, 2015 Hi, I don't know for sure, but the 2nd, 3rd and 4th parameter are supposed to be the x, y and z forces that act on the ped...at least after whats written in the native db. You supply all with 0, which doesn't seem right. In addition, you're defining the bool value inside the function making it a local one, which is pointless. In your scenario, you could do if (GetAsyncKeyState(0xDB)) only and get the same result. Quote Share this post Link to post Share on other sites
palemouse 1 Posted May 15, 2015 You have to call the ragdoll native every frame in order for the PED to stay in the ragdoll state Quote Share this post Link to post Share on other sites