Skip to content
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] - es_extended - After relog, player are not recognized as dead #1297

Closed
iSentrie opened this issue Jan 27, 2024 · 5 comments
Closed

[Bug] - es_extended - After relog, player are not recognized as dead #1297

iSentrie opened this issue Jan 27, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@iSentrie
Copy link
Contributor

iSentrie commented Jan 27, 2024

When player dies and does reconnect, he's not recognized as dead and dead player cannot call for emergency services also can't see respawn/bleedout timer.

To Reproduce

  1. Die
  2. Quit game
  3. Connect back to game
  4. Player won't receive option to call for emergency or see timer until respawn.

Debug Info:

  • OS: Linux
  • FiveM Artifact b7330
  • ESX Version: 1.10.3
  • No multichar ⚠️

image

@iSentrie iSentrie added the bug Something isn't working label Jan 27, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in ESX Roadmap Jan 27, 2024
@Gellipapa
Copy link
Contributor

@iSentrie Hi! Thank you for report issue. Is there any modification within es_extended in your client/main.lua esx:playerLoaded event?

@iSentrie
Copy link
Contributor Author

iSentrie commented Jan 27, 2024

@iSentrie Hi! Thank you for report issue. Is there any modification within es_extended in your client/main.lua esx:playerLoaded event?

No, 1:1, not modified, however I updated only es_extended, if any other resource could have impact to this, then it might be on my side.

Like, hm, the issue is actually with esx_ambulancejob, because this script doesn't show respawn timer, so a bit tricky to choose where to look for an issue, but my guess is that metadata stuff kills player so fast, that not all data have been received at that time in other resources?

@Gellipapa
Copy link
Contributor

@iSentrie Hi! Thank you for report issue. Is there any modification within es_extended in your client/main.lua esx:playerLoaded event?

No, 1:1, not modified, however I updated only es_extended, if any other resource could have impact to this, then it might be on my side.

Like, hm, the issue is actually with esx_ambulancejob, because this script doesn't show respawn timer, so a bit tricky to choose where to look for an issue, but my guess is that metadata stuff kills player so fast, that not all data have been received at that time in other resources?

We found the problem because it doesn't use multichart, so there is no delay, and the metadata ped setup runs before the actual ped spawn, and that's the problem.

@iSentrie
Copy link
Contributor Author

iSentrie commented Jan 27, 2024

So the plan is to use "3000" delay for both, not just multichar? Like so

RegisterNetEvent("esx:playerLoaded")
AddEventHandler("esx:playerLoaded", function(xPlayer, isNew, skin)
    ESX.PlayerData = xPlayer

    if not Config.Multichar then
        exports.spawnmanager:spawnPlayer({
            x = ESX.PlayerData.coords.x,
            y = ESX.PlayerData.coords.y,
            z = ESX.PlayerData.coords.z + 0.25,
            heading = ESX.PlayerData.coords.heading,
            model = `mp_m_freemode_01`,
            skipFade = false,
        }, function()
            TriggerServerEvent("esx:onPlayerSpawn")
            TriggerEvent("esx:onPlayerSpawn")
            TriggerEvent("esx:restoreLoadout")

            if isNew then
                TriggerEvent("skinchanger:loadDefaultModel", skin.sex == 0)
            elseif skin then
                TriggerEvent("skinchanger:loadSkin", skin)
            end

            TriggerEvent("esx:loadingScreenOff")
            ShutdownLoadingScreen()
            ShutdownLoadingScreenNui()
        end)
    end

    Wait(3000)
    ESX.PlayerLoaded = true

If that wont lead to vulnerabilities... Maybe better solution would be to use a handler skinchanger:modelLoaded 🤔

@Gellipapa
Copy link
Contributor

@iSentrie Hi! We have fixed the reported issue and released the latest version 1.10.4 which includes this fix.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in ESX Roadmap Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants