{"hash":"0xFA12E286","ns":"CFX","name":"SET_PED_TO_RAGDOLL_WITH_FALL","slug":"SET_PED_TO_RAGDOLL_WITH_FALL","official":true,"named":true,"luaName":"SetPedToRagdollWithFall","game":"cfx","apiset":"server","returnType":"void","params":[{"name":"ped","type":"Ped","description":"The ped to ragdoll."},{"name":"minTime","type":"int"},{"name":"maxTime","type":"int"},{"name":"nFallType","type":"int","description":"The type of fall."},{"name":"dirX","type":"float","description":"The x direction of the fall."},{"name":"dirY","type":"float","description":"The y direction of the fall."},{"name":"dirZ","type":"float","description":"The z direction of the fall."},{"name":"fGroundHeight","type":"float","description":"The ground height (z)."},{"name":"grab1X","type":"float","description":"unused"},{"name":"grab1Y","type":"float","description":"unused"},{"name":"grab1Z","type":"float","description":"unused"},{"name":"grab2X","type":"float","description":"unused"},{"name":"grab2Y","type":"float","description":"unused"},{"name":"grab2Z","type":"float","description":"unused"}],"summary":"Return variable is never used in R's scripts.","descriptions":[{"source":"cfx","format":"md","body":"```cpp\nenum eNMFallType {\nTYPE_FROM_HIGH = 0,\nTYPE_OVER_WALL = 1,\nTYPE_DOWN_STAIRS = 2,\nTYPE_DIE_TYPES = 3,\nTYPE_DIE_FROM_HIGH = 4,\nTYPE_DIE_OVER_WALL = 5,\nTYPE_DIE_DOWN_STAIRS = 6\n}\n```\n\n```\nReturn variable is never used in R*'s scripts.\nNot sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings.\nx, y, and z are coordinates, most likely to where the ped will fall.\np7 is probably the force of the fall, but untested, so I left the variable name the same.\np8 to p13 are always 0f in R*'s scripts.\n(Simplified) Example of the usage of the function from R*'s scripts:\nped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f);\n```\n\n**This is the server-side RPC native equivalent of the client native [SET_PED_TO_RAGDOLL_WITH_FALL](?\\_0xD76632D99E4966C8).**"}],"examples":[],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":2,"url":"https://natives.borderlinerp.com/natives/CFX/SET_PED_TO_RAGDOLL_WITH_FALL","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/SET_PED_TO_RAGDOLL_WITH_FALL.md","snippets":{"lua":"SetPedToRagdollWithFall(ped, minTime, maxTime, nFallType, dirX, dirY, dirZ, fGroundHeight, grab1X, grab1Y, grab1Z, grab2X, grab2Y, grab2Z)","luaInvoke":"Citizen.InvokeNative(0xfa12e286, ped, minTime, maxTime, nFallType, dirX, dirY, dirZ, fGroundHeight, grab1X, grab1Y, grab1Z, grab2X, grab2Y, grab2Z)","js":"SetPedToRagdollWithFall(ped, minTime, maxTime, nFallType, dirX, dirY, dirZ, fGroundHeight, grab1X, grab1Y, grab1Z, grab2X, grab2Y, grab2Z);","jsInvoke":"Citizen.invokeNative('0xfa12e286', ped, minTime, maxTime, nFallType, dirX + 0.0000001, dirY + 0.0000001, dirZ + 0.0000001, fGroundHeight + 0.0000001, grab1X + 0.0000001, grab1Y + 0.0000001, grab1Z + 0.0000001, grab2X + 0.0000001, grab2Y + 0.0000001, grab2Z + 0.0000001);","csharp":"Function.Call((Hash)0xfa12e286, ped, minTime, maxTime, nFallType, dirX, dirY, dirZ, fGroundHeight, grab1X, grab1Y, grab1Z, grab2X, grab2Y, grab2Z);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason."]}}