Cutscenes Questions & Discussions

I was playing around with some code, and i decided to try cutscenes. I fount that in the list there are also mp cutscenes. I was wondering: do you know if there’s a way to replace the default mp_m_freemode_01 or mp_f_freemode_01 present in cutscenes with my custom ped? I tried with:

SetCutscenePedComponentVariation(idk)
RegisterEntityForCutscene(some random values)

i think that we can work also with casino cutscenes to create cool heists.

7 Likes

Well I have tried out cutscenes as well and actually manage to play some of them but still has the problem to change how the ped is looking. Here was my code to play the bunker cutscene:

RegisterCommand("cut", function(source, args)

    RequestCutscene("bunk_int", 8)

    while not HasCutsceneLoaded() do
         RequestCutscene("bunk_int", 8)
		
        Citizen.Wait(50)
	
    end
 StartCutscene(0)

end)

I have tried these commands without any luck to change the character:
SetCutscenePedComponentVariation(“bunk_int”, 2, 5, 1, 1885233650)
SetCutscenePedComponentVariationFromPed(“bunk_int”, GetPlayerPed(-1), 1885233650)
If anyone have any ideas that would be great cause I am currently stuck.

3 Likes

@zThundy @Krille_koffe
This is what I found to work. Keep in mine you dont need it in an event this is what I did.

RegisterNetEvent('your_cutscene_event')
AddEventHandler('your_cutscene_event', function()

    RequestCutscene('your_cutscene_here', 8) -- Usually 8.
    while not (HasCutsceneLoaded()) do
        Wait(0)
    end
    
    -- Sets current player ped as cutscene mp ped.
    SetCutsceneEntityStreamingFlags('MP_1', 0, 1)
    RegisterEntityForCutscene(PlayerPedId(), '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 clothing you want on the cutscene ped.
    SetPedComponentVariation(PlayerPedId(), componentId, drawableId, textureId, paletteId)

    while not (HasCutsceneFinished()) do
        Wait(0)
    end
    
    -- What every you want to do after the cutscene.

end)

Hope this helps!

5 Likes

Thanks for the response. Dam gotta turn on notifications. I will try it tomorrow and let you know if it worked. Thanks again.
/Krillekoffe

Hey. Thanks for the help. It worked perfectly. Here is a picture of all the 4 peds in the prison break mid cutscene.

2 Likes

Hello! i’m also searching on how to replace the basic default MP ped when you are playing an online animation, could you share your code or show an example ? ^^ Thanks a lot

2 Likes

Sure. Here is the code i used

RegisterCommand("cut2", function()

TriggerEvent('your_cutscene_event', 'mph_pri_mid')
end)
--Cutscene
RegisterNetEvent('your_cutscene_event')
AddEventHandler('your_cutscene_event', function(cutscene)
 local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(-1), false))
    RequestCutscene(cutscene, 8) -- Usually 8.
    while not (HasCutsceneLoaded()) do
        Wait(0)
    end
    
    -- Sets current player ped as cutscene mp ped.


 local model = GetHashKey("u_m_y_cyclist_01")

    RequestModel(model)
    while not HasModelLoaded(model) do
        RequestModel(model)
        Citizen.Wait(0)
    end
local ped = CreatePed(7, model, x, y ,z, 0.0, true, true)

 local model2 = GetHashKey("s_m_y_marine_01")

    RequestModel(model2)
    while not HasModelLoaded(model2) do
        RequestModel(model2)
        Citizen.Wait(0)
    end
local ped2 = CreatePed(7, model2, x, y ,z, 0.0, true, true)

 local model3 = GetHashKey("s_m_y_doorman_01")

    RequestModel(model3)
    while not HasModelLoaded(model3) do
        RequestModel(model3)
        Citizen.Wait(0)
    end
local ped3 = CreatePed(7, model3, x, y ,z, 0.0, true, true)

   
       SetCutsceneEntityStreamingFlags('MP_1', 0, 1)
	
    RegisterEntityForCutscene(ped, 'MP_1', 0, 0, 64)
	
	
	       SetCutsceneEntityStreamingFlags('MP_2', 0, 1)
	
    RegisterEntityForCutscene(PlayerPedId(), 'MP_2', 0, 0, 64)
	
		       SetCutsceneEntityStreamingFlags('MP_3', 0, 1)
	
    RegisterEntityForCutscene(ped2, 'MP_3', 0, 0, 64)
	
	
		       SetCutsceneEntityStreamingFlags('MP_4', 0, 1)
	
    RegisterEntityForCutscene(ped3, 'MP_4', 0, 0, 64)
	
    StartCutscene(0)

    -- Waiting for the cutscene to spawn the mp ped.
    while not (DoesCutsceneEntityExist('MP_2', 0)) do
        Wait(0)
    end
	
	    while not (DoesCutsceneEntityExist('MP_1', 0)) do
        Wait(0)
    end
	
		    while not (DoesCutsceneEntityExist('MP_3', 0)) do
        Wait(0)
    end
	
	
			    while not (DoesCutsceneEntityExist('MP_4', 0)) do
        Wait(0)
    end
	 --SetCutsceneEntityStreamingFlags('MP_2', 0, 1)
	
--RegisterEntityForCutscene(PlayerPedId(), 'MP_2', 0, 0, 64)
	

    -- Set the clothing you want on the cutscene ped.
    --SetPedComponentVariation(PlayerPedId(), componentId, drawableId, textureId, paletteId)
--SetCutscenePedComponentVariationFromPed(PlayerPedId(), GetPlayerPed(-1), 1885233650)
--SetPedComponentVariation(PlayerPedId(), 11, 55, 0, 2)
    while not (HasCutsceneFinished()) do
        Wait(0)
    end
    
    -- What every you want to do after the cutscene.

end)

Hope this helps. Best regards Krille

7 Likes

I used this code

RegisterCommand("cut", function(source, args)

    RequestCutscene('bunk_int', 8) -- Usually 8.

    while not (HasCutsceneLoaded()) do

        Wait(0)

    end

    

    -- Sets current player ped as cutscene mp ped.

    SetCutsceneEntityStreamingFlags('MP_1', 0, 1)

    RegisterEntityForCutscene(PlayerPedId(), '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 clothing you want on the cutscene ped.

    SetPedComponentVariation(PlayerPedId(), componentId, drawableId, textureId, paletteId)

    while not (HasCutsceneFinished()) do

        Wait(0)

    end

    

    -- What every you want to do after the cutscene.

end)

But the walls and stuff are invisible? - I can only see peds and vehicles

1 Like

You have to teleport your player to the scene to see everything or Load ipl !

Hello, I have a problem here I would like to modify the peds which are inside the plane but I cannot find how to do it, so someone can help me.
Thank you in advance for your help here is the name of the cutscene: mp_intro_concat

Hi MrZedo, I have also tired to fix the plane scene, the one were a player get’s transported to GTA online but have not been able to replace the ped (same as you). Don’t know the solution yet but I let you know if I find one.

Whats the name of the cutscene? I couldn’t find it anywhere @Krille_koffe

I am not sure I understand what you mean. But I used ‘mph_pri_mid’ cutscene which is shown in previous code post on row 2.

Does anyone know any racing cutscenes?