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

Player's don't get revived/healed in hospital beds #99

Closed
ADRNALN opened this issue Nov 21, 2023 · 3 comments
Closed

Player's don't get revived/healed in hospital beds #99

ADRNALN opened this issue Nov 21, 2023 · 3 comments
Labels
bug Something isn't working need repro This bug report needs confirmation

Comments

@ADRNALN
Copy link

ADRNALN commented Nov 21, 2023

Summary

Player's don't get revived/healed in hospital beds

Reproduction

When players check in at the front desk of the hospital with no doctors online they get sent to the beds and wait 20 seconds (time in config). Once that completes the player isn't healed or revived. I added print statements and each line prints but it seems that TriggerEvent("hospital:client:Revive") doesn't do anything

Expected behavior

Healing / reviving player

Actual behavior

Nothing happens

Additional context

        Wait(5)
        print("Here")
        if isRevive then
            print("Here1")
            exports.qbx_core:Notify(Lang:t('success.being_helped'), 'success')
            print("Here2")
            Wait(Config.AIHealTimer * 1000)
            print("Here3")
            TriggerEvent("hospital:client:Revive")
            print("Here4")
        else
            CanLeaveBed = true
        end
    end)```

### Last Updated

today

### Custom Resources

no

### Resource Rename

qbx_ambulancejob
@ADRNALN ADRNALN added bug Something isn't working need repro This bug report needs confirmation labels Nov 21, 2023
@D4isDAVID D4isDAVID added this to Issues Nov 21, 2023
@github-project-automation github-project-automation bot moved this to Todo in Issues Nov 21, 2023
@solareon
Copy link
Contributor

local function leaveBed()
local ped = cache.ped
local getOutDict = 'switch@franklin@bed'
local getOutAnim = 'sleep_getup_rubeyes'
lib.requestAnimDict(getOutDict)
FreezeEntityPosition(ped, false)
SetEntityInvincible(ped, false)
SetEntityHeading(ped, bedOccupyingData.coords.w + 90)
TaskPlayAnim(ped, getOutDict, getOutAnim, 100.0, 1.0, -1, 8, -1, false, false, false)
Wait(4000)
ClearPedTasks(ped)
TriggerServerEvent('qbx_ambulancejob:server:playerLeftBed', hospitalOccupying, bedIndexOccupying)
FreezeEntityPosition(bedObject, true)
RenderScriptCams(false, true, 200, true, true)
DestroyCam(cam, false)
hospitalOccupying = nil
bedIndexOccupying = nil
bedObject = nil
bedOccupyingData = nil
IsInHospitalBed = false
exports.qbx_medical:EnableDamageEffects()
if QBX.PlayerData.metadata.injail <= 0 then return end
TriggerEvent("prison:client:Enter", QBX.PlayerData.metadata.injail)
end

So somewhere in here I believe needs to be a call to TriggerEvent('qbx_medical:client:playerRevived') but not sure if this the right method

@SKITTLE6969
Copy link
Contributor

can confirm this, not happening and not calling the medical revive event

@mafewtm
Copy link
Member

mafewtm commented Feb 7, 2024

This was fixed in 7f899bb

@mafewtm mafewtm closed this as completed Feb 7, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues Feb 7, 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 need repro This bug report needs confirmation
Projects
Status: Done
Development

No branches or pull requests

4 participants