Unable to damage players while in SetPedToRagdoll loop
What happened?
When a player ped is continuously forced into ragdoll using SetPedToRagdoll in a loop, the ped becomes effectively immune to all weapon damage from guns. While ragdolling, the player cannot be damaged by firearms at all. The only ways to kill or damage the player are via explosions (e.g. C4) or by blowing the ped up entirely.
This happens consistently as long as SetPedToRagdoll is being called repeatedly.
The issue does not appear to be weapon-specific — all firearms fail to deal damage.
Expected result
Players should still be able to take normal weapon damage (e.g. bullets) while in a ragdoll state created via SetPedToRagdoll, similar to how NPCs or naturally ragdolled peds behave. Being in ragdoll should not make a player invulnerable to gun damage.
Reproduction steps
RegisterCommand('ragdoll', function()
if Main and Main.disableModules then return end
if IsPedInAnyVehicle(cache.ped, false) then return end
if not isRagdolling then
isRagdolling = true
else
isRagdolling = false
end
Citizen.CreateThread(function()
while isRagdolling do
SetPedToRagdoll(cache.ped, 1000, 1000, 0, 0, 0, 0)
Citizen.Wait(5)
end
end)
end)
coded this
- trigger ragdoll on a players client
- another player tries to kill the player that is ragdoll but it wont take any damgages evan tried by making a loop that showed player health shooting it multiple times did nothing health still at 200
Importancy
Slight inconvenience
Area(s)
FiveM
Specific version(s)
tried on 20035 and latest(23918)
Additional information
A tried on to artifacts 20035 and latest
This is expected behavior, I'm not sure if the player's immortality is forced, but it makes sense because the ragdoll isn't synchronized, and each client will see the ragdoll player in different positions.
I expected some desync-related issues, but in this case the player could not be damaged at all by firearms. I tested shooting both the ped position on my client and the position on the other client, with the same result every time. No gun damage was ever applied while SetPedToRagdoll was running. The only way to kill the player was with explosives it took 4 C4 placed directly on the ped to kill them. This doesn’t seem related to ped position or sync, but rather that firearm damage is completely blocked while SetPedToRagdoll is applied continuously.
This is really annoying yea