-
-
Notifications
You must be signed in to change notification settings - Fork 474
Labels
Milestone
Description
Describe the bug
The only way to respawn a ped is with setElementHealth, yet after calling setElementHealth on a dead ped, the server returns true
for isPedDead
. You can't damage the ped any more even though ped.health == 100
.
To Reproduce
crun setElementPosition(localPlayer, 1968, -2033, 13)
srun a = createPed(0, 1967, -2025, 13)
-- Kill the ped
srun isPedDead(a) -- true
srun setElementHealth(a, 100)
srun isPedDead(a) -- true (should be false)
-- Shoot the ped, it won't take damage
Expected behaviour
@qaisjp said:
Setting the health of a ped to a
health > 0
should respawn the ped.
Additional context
Do this after calling setElementHealth: setElementSyncer(a, true) and the ped will be able to take damage again, but onPedWasted isn't triggered.