How to open rockstar editor in FiveM

Hello everyone, I have been looking and nowhere is it explained how you could create a menu to be able to record clips from rockstar editor without the need for any external script. As I have found it, I share it with you, it is very simple, they are a couple of FiveM natives that you can find at Native Reference - Cfx.re Docs.

Code:

if data.current.value == 'editor' then

    ESX.UI.Menu.Open(

        'default', GetCurrentResourceName(), 'editor',

        {

       title    = '<b>Rockstar Editor</b>',

       align = 'bottom-right',

       elements = {

           {label = 'Open rockstar editor', value = 'open'},

           {label = 'Record', value = 'record'},

           {label = 'Stop recording', value = 'stop'}

       }

   },

   function(data, menu)

    local valu = data.current.value

    if valu == 'open' then

        ActivateRockstarEditor()

    elseif valu == 'record' then

        StartRecording(1)

    elseif valu == 'stop' then

        StopRecordingAndSaveClip()

    end

 end,

   function(data, menu)

       menu.close()

   end
 )
  end

I have used it to add it to a menu that I have so that users can see their money, their documents, etc. I hope it helps you!

Example: https://i.gyazo.com/300677b8776009c007e2d73fe8e51873.gif

Use this Menu

There you can Record Clip’s and directly Enter the Rockstar Editor :slight_smile:

Nice work! I know there are quite a few people who want something other then vmenu so they don’t have to worry about lag and high res just to use, a Simple feature.

2 Likes

If it is a Release

Post it in #development:releases