-
-
Notifications
You must be signed in to change notification settings - Fork 502
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Calling this function with onClientPlayerWasted will return false (ped is not dead) if you die by falling (client-side), However on server-side, calling it with onPlayerWasted will return true (ped is dead) if you also die for the same reason.
This bug happens only if you die by falling as far as I know but, if you delay the call to isPedDead function when onClientPlayerWasted, it returns true (player is dead)
It happens even for the localPlayer who is always considered as a streamed-in GTA SA entity.
Steps to reproduce
-- client (no call delay)
addEventHandler("onClientPlayerWasted", root,
function()
-- player dies due to falling (localPlayer included)
iprint(isPedDead(source))
-- returns false (ped not dead but he triggered the onClientPlayerWasted event?)
end)
-- client (with call delay)
addEventHandler("onClientPlayerWasted", root,
function()
-- player dies due to falling (localPlayer included)
local player = source
setTimer(
function() iprint(isPedDead(player)) end
100, 1)
-- sometines 50ms of delay still causes it to out put false
-- returns true (ped is dead)
end)
-- server
addEventHandler("onPlayerWasted", root,
function()
-- player dies due to falling.
iprint(isPedDead(source))
-- returns true (ped is dead)
end)Version
Latest version (not nightly)
Additional context
No response
Relevant log output
Security Policy
- I have read and understood the Security Policy and this issue is not security related.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working