View Issue Details

IDProjectCategoryView StatusLast Update
0008790Multi Theft Auto : San AndreasSynchronizationpublic2018-09-05 17:51
ReporterarranTunaAssigned To 
Status closedResolutionsuspended 
Product Version 
Target VersionFixed in Version 
Summary0008790: Using setElementHealth on a dead ped makes it invincible

The only way to respawn a ped is with setElementHealth yet after calling setElementHealth on a dead ped, the server still thinks isPedDead == true. You can't damage the ped any more even though getElementHealth == 100.

Edit: Do this after calling setElementHealth: setElementSyncer(a, true) and the ped will be able to take damage again, but onPedWasted isn't triggered.

Steps 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

TagsNo tags attached.



2017-11-06 19:21

reporter   ~~0026262

How should it be changed:
Should MTA check, if the ped is dead, and don't set the HP when it's true?
Or should the ped get respawned when he was dead?

Issue History

Date Modified Username Field Change