[HELP] Fivem Cutscenes

Hey, I tried to make a cutscene, everything works but the player skin. everytime I did the cutscene it resets my skin. The face stays, but everything else resets. How do I fix that?

local ped = PlayerPedId()
    RequestCutscene("heist_int", 8)
    while not (HasCutsceneLoaded()) do
        Wait(0)
        RequestCutscene("heist_int", 8)
    end

    -- Sets current player ped as cutscene mp ped.

    SetCutsceneEntityStreamingFlags('MP_1', 0, 1)
    RegisterEntityForCutscene(ped, 'MP_1', 0, 0, 64)
    SetCutscenePedComponentVariationFromPed(ped, ped, 1885233650)

    StartCutscene(0)

    -- Waiting for the cutscene to spawn the mp ped.
    while not (DoesCutsceneEntityExist('MP_1', 0)) do
        Wait(0)
    end

    while not (HasCutsceneFinished()) do
        Wait(0)
    end
1 Like

Hey, did you find a solution so it dont reset skin?

Nope. I couldn’t find

I can tell you why…

Becouse you have not set any SetPedComponentVariation(ped, 5, 132, 0, 0)

5 == what kind of clothes… are it body ammor, shoes, legs, shirts? go in the link under to se what number.
132 == what clothes you want to have on. Look here: (can’t link) so goolge “wiki rage clothes”
first 0 == texture id. (used if you have more than 1 clothes on the same numer (132))
last 0 == don’t mind this, you don’t need to change this.

Thanks but arent there any way i can get a players clothes? Because its kinda sad that you have your own clothes on?

Just save the clothes you have before you run the cutscene. like this:
So. this should work. but for some reason i need → ’ ← to the script work. Mayby just a mistake on forum.cfx (idk) if for some reason it don’t work it’s properly the reason.


local ped = PlayerPedId()
    RequestCutscene("heist_int", 8)
    while not (HasCutsceneLoaded()) do
        Wait(0)
        RequestCutscene("heist_int", 8)
    end

   TriggerEvent('save_all_clothes') -- saves the clothes

    -- Sets current player ped as cutscene mp ped.

    SetCutsceneEntityStreamingFlags('MP_1', 0, 1)
    RegisterEntityForCutscene(ped, 'MP_1', 0, 0, 64)

    StartCutscene(0)

    -- Waiting for the cutscene to spawn the mp ped.
    while not (DoesCutsceneEntityExist('MP_1', 0)) do
        Wait(0)
    end
   -- Set the clothes that you had on ped ' <-- for some reason that is needed to comment.
   SetCutscenePedComponentVariationFromPed(PlayerPedId(), GetPlayerPed(-1), 1885233650)
   SetPedComponentVariation(GetPlayerPed(-1), 11, jacket_old, jacket_tex, jacket_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 8, shirt_old, shirt_tex, shirt_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 3, arms_old, arms_tex, arms_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 4, pants_old,pants_tex,pants_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 6, feet_old,feet_tex,feet_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 1, mask_old,mask_tex,mask_pal)
   SetPedComponentVariation(GetPlayerPed(-1), 9, vest_old,vest_tex,vest_pal)
   SetPedPropIndex(GetPlayerPed(-1), 0, hat_prop, hat_tex, 0)
   SetPedPropIndex(GetPlayerPed(-1), 1, glass_prop, glass_tex, 0)

    while not (HasCutsceneFinished()) do
        Wait(0)
    end

-- after the funtion end.

RegisterNetEvent('save_all_clothes') -- The actual saving.
AddEventHandler('save_all_clothes',function()
    local ped = GetPlayerPed(-1)
    mask_old,mask_tex,mask_pal = GetPedDrawableVariation(ped,1),GetPedTextureVariation(ped,1),GetPedPaletteVariation(ped,1)
    vest_old,vest_tex,vest_pal = GetPedDrawableVariation(ped,9),GetPedTextureVariation(ped,9),GetPedPaletteVariation(ped,9)
    glass_prop,glass_tex = GetPedPropIndex(ped,1),GetPedPropTextureIndex(ped,1)
    hat_prop,hat_tex = GetPedPropIndex(ped,0),GetPedPropTextureIndex(ped,0)
    jacket_old,jacket_tex,jacket_pal = GetPedDrawableVariation(ped, 11),GetPedTextureVariation(ped,11),GetPedPaletteVariation(ped,11)
    shirt_old,shirt_tex,shirt_pal = GetPedDrawableVariation(ped,8),GetPedTextureVariation(ped,8),GetPedPaletteVariation(ped,8)
    arms_old,arms_tex,arms_pal = GetPedDrawableVariation(ped,3),GetPedTextureVariation(ped,3),GetPedPaletteVariation(ped,3)
    pants_old,pants_tex,pants_pal = GetPedDrawableVariation(ped,4),GetPedTextureVariation(ped,4),GetPedPaletteVariation(ped,4)
    feet_old,feet_tex,feet_pal = GetPedDrawableVariation(ped,6),GetPedTextureVariation(ped,6),GetPedPaletteVariation(ped,6)
end)

2 Likes

thanks bro it works perfekt now, the only problem is that the hair resets?
Do you have any idea how to make that? :smile:

1 Like

Works, Thanks you!

1 Like

what hair does you get?

bald :frowning:

If you get “bald” every time. just save the hair. just like i did in the code over me.

– paste this beside the other clothing stuff

SetPedComponentVariation(GetPlayerPed(-1), 2, hair_old,hair_tex,hair_pal)

Paste this in ‘save_all_clothes’

hair_old,hair_tex,hair_pal = GetPedDrawableVariation(ped,2),GetPedTextureVariation(ped,2),GetPedPaletteVariation(ped,2)

my skin type resest to default

Do the same thing as before, just use “skin” instead.

While the cutscene is running my character’s skin is resetting, I am bit confused about this, please help me on this