[FREE][STANDALONE] GTA:O First Death

GTA:O First Death Scene for FiveM

Showcase
First Death

Download
Github

You can look my other resources: Tebex

Feel free if you have any question or suggest!

14 Likes

anyway to actually add this to someone dying in the city and not just typing the command /fdeath for it to work? It also seems to trigger the rain on always when triggered. I cant get it to stop raining with vmenu, I have to leave and come back to get it to stop.

2 Likes

This doesnt work to me. Graphic change a bit etc… but there is no cutscene

1 Like

Are you sure you don’t have a resource blocking cutscenes?

I did update for rain issue.

What native could block it? There is a cutscene in the server after player registered so it shouldnt be an issue.

Does it only work with / command?

LOL love this! Added it to respawning at Pillbox. Can’t wait for the players feedback

1 Like

Just force the event on the player when you die?

It will be enough to add it to any of your spawn script.

can you show us how we would add this to esx_ambulancejob? what are the triggers?

I would like to change the ped in the scene:

I know this is the code for that:
SetCutsceneEntityStreamingFlags(‘MP_1’, 0, 1)
RegisterEntityForCutscene(PlayerPedId(), ‘MP_1’, 0, 0, 64)

I know ‘MP_1’ should be changed to something else based on how is this called the ped in this cutscene. Do you know how the ped is called in this cutscene?

I did look but i cant find anything about change ped call.

Any tutorial to add this to ambulancejob death?

How did you add it i tried but it didnt work for me or most probably i did something wrong

That’s how i use it

RegisterNetEvent('hospital:client:playepsscene', function()
    local maleScene = 'MP_INT_MCS_18_A1'
    local femaleScene = 'MP_INT_MCS_18_A2'
    if QBCore.Functions.GetPlayerData().charinfo.gender == 1 then
        SetCutsceneTriggerArea(0.0, 0.0, 0.0, 0.0, 121.6249, 0.0);
        x = AddNavmeshBlockingObject(-1314.997, -1721.084, 1.1493, 100.0, 100.0, 100.0, 0.0, false, 7)
        SetPedNonCreationArea(-1324.736, -1756.909, -10.0, -1299.695, -1688.181, 10.0)
        SetOverrideWeather('CLEARING')
        SetTransitionTimecycleModifier("Kifflom", 1.0)
        NetworkOverrideClockTime(18, 0, 0)
        N_0xfb680d403909dc70(1, PlayerId() + 32)
        SetRainLevel(0.0)
        PlayCutscene(femaleScene, vector3(-1314.997, -1721.084, 1.1493))
        ClearTimecycleModifier()
        ClearPedNonCreationArea()
        RemoveNavmeshBlockingObject(x)
    else
        SetCutsceneTriggerArea(0.0, 0.0, 0.0, 0.0, 121.6249, 0.0);
        x = AddNavmeshBlockingObject(-1314.997, -1721.084, 1.1493, 100.0, 100.0, 100.0, 0.0, false, 7)
        SetPedNonCreationArea(-1324.736, -1756.909, -10.0, -1299.695, -1688.181, 10.0)
        SetOverrideWeather('CLEARING')
        SetTransitionTimecycleModifier("Kifflom", 1.0)
        NetworkOverrideClockTime(18, 0, 0)
        N_0xfb680d403909dc70(1, PlayerId() + 32)
        SetRainLevel(0.0)
        PlayCutscene(maleScene, vector3(-1314.997, -1721.084, 1.1493))
        ClearTimecycleModifier()
        ClearPedNonCreationArea()
        RemoveNavmeshBlockingObject(x)
    end
end)

function PlayCutscene(cut, coords)
    while not HasThisCutsceneLoaded(cut) do 
        RequestCutsceneWithPlaybackList(cut, 29, 8)
        Wait(0) 
    end
    CreateCutscene(coords)
    Finish()
    RemoveCutscene()
    DoScreenFadeIn(500)
end

function CreateCutscene(coords)
    StartCutsceneAtCoords(coords, 0)
    DoScreenFadeIn(250)
end

function Finish()
    local tripped = false
    repeat
        Wait(0)
        if (GetCutsceneTotalDuration() - GetCutsceneTime() <= 250) then
        DoScreenFadeOut(250)
        tripped = true
        end
    until not IsCutscenePlaying()
    if (not tripped) then
        DoScreenFadeOut(100)
        Wait(150)
    end
    return
end

RegisterNetEvent('hospital:client:RespawnAtHospital', function()
    local sceneluck = math.random(1, 10)
    if sceneluck == 5 then
    TriggerEvent("hospital:client:playepsscene")
    end
    TriggerServerEvent("hospital:server:RespawnAtHospital")
    if exports["qb-policejob"]:IsHandcuffed() then
        TriggerEvent("police:client:GetCuffed", -1)
    end
    TriggerEvent("police:client:DeEscort")
end)
2 Likes

hero!

1 Like

nice, but you know how to do it in esx? im trying but i dont get anything

where i post the code inside in the ambulance job or in the lua from fdeath