-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] isdead metadata not applied on death #23
Comments
I suspect #24 might fix this. Or possibly it's unrelated. |
from qbx-medical/server/main.lua: starting line 100: RegisterNetEvent('qbx-medical:server:playerDied', function()
if GetInvokingResource() then return end
print('source')
print(source)
local src = source
print('src')
print(src)
local player = QBCore.Functions.GetPlayer(src)
if not player then return end
print(player.PlayerData.metadata.isdead)
player.PlayerData.metadata.isdead = true
print(player.PlayerData.metadata.isdead)
end) removed source from function, as the id was not passing, additionally it looks like: player.Functions.SetMetaData('isdead', true) Is not applying the metadata, if I do: player.PlayerData.metadata.isdead = true It does work well print before
print after
|
Looking further I see that the value does not get saved to the DB when changed at that moment, it is doing a save after X amount of minutes, meaning for example if you go into laststand, it will take several seconds/minutes for the inlaststand in the DB to update, possibly updating while you are at the end of the laststand, I think it should be quicker, since if you logout, you want to save this? |
This Qbox-project/qbx_core#114 and this #25 should do the trick |
This has been fixed with the above PRs, closing this. |
Summary
isdead metadata not applied on death
Reproduction
Try dying
Expected behavior
Update isdead metadata to true
Actual behavior
value stays as false
Additional context
Was creating a take hostage script and creating the condition to disallow grabbing a person in isdead metadata and noticed after death that isdead parameter is not being moved from false to true. inlaststand is being updated correctly.
Last Updated
n/a
Custom Resources
n/a
Resource Rename
n/a
The text was updated successfully, but these errors were encountered: