[Release] Cinematic Cam

please help

Sorry, busy with some projects on my end.I try to be as clear as possible now.

In the fxmanifest.lua is the line '@NativeUILua-Reloaded/src/NativeUIReloaded.lua',
The thing after the @sign is the path to the respective file of NativeUILua-Reloaded. It needs to be the same as the actual path! So if your NativeUI folder in your resources is called “NativeUILua_Reloaded-master” it ALSO needs to be changed in my fxmanifest.lua.

The error you send implies that it either cannot find that file OR that there might be something broken in that file. But it is probably just not finding it.

Hey so I’m getting a error when I try to open the cam menu.
SCRIPT ERROR: @cinematiccam/client.lua:206: attempt to index a nil value (field ‘Submenu’)

Depending on which Native UI you use, you have to change several things. Check the original post again.

Your error is an indicator for that.

I don’t know how to program and activate the white list, can you write an example code?

Put this in between the comments:

if (GetPlayerIdentifiersSorted(source)["steam"] == "STEAMID GOES HERE") then
    isWhitelisted = true
end

and put this code somewhere below: ( this can also be pretty nifty for anyone else who might need it)

-- Return an array with all identifiers - e.g. ids["license"] = license:xxxxxxxxxxxxxxxx
function GetPlayerIdentifiersSorted(playerServerId)
    local ids = {
        ['license']    = "",
        ['steam']    = "",
        ['discord']    = "",
        ['xbl']        = "",
        ['live']    = "",
        ['fivem']    = "",
        ['name']    = "",
        ['ip']        = "",
    }

    local identifiers = GetPlayerIdentifiers(playerServerId)

    for k, identifier in pairs (identifiers) do
        local i, j = string.find(identifier, ":")
        local idType = string.sub(identifier, 1, i-1)

        ids[idType] = identifier
    end

    return ids
end

This should be it. At least for a single identifier. If you need it in a loop, hit me up.

Hi @Kiminaze
Love the cinematic camera but having an issue all of a sudden on my server. I’m not getting this error message showing in the console. Any idea on what might be causing it?

2 Likes

You need to enable the correct NativeUI Version.

In the config are two options you need to set to true and false depending on the version you use and then in the fxmanifest.lua you need to comment / uncomment the right versions (and maybe adjust their filepaths)

1 Like

Thank you

1 Like

did not work
so ?

If not like that, can you write the entire server file?

This would be the whole file and only put your steam ID where it says “PUT YOUR ID HERE”
No touchy below that :wink:

--------------------------------------------------
---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ----
--------------------------------------------------

local whitelisted = "PUT YOUR ID HERE"

RegisterServerEvent('CinematicCam:requestPermissions')
AddEventHandler('CinematicCam:requestPermissions', function()
	local isWhitelisted = false

	-- \/ -- permission check here (set "isWhitelisted") -- \/ --

    if (GetPlayerIdentifiersSorted(source)["steam"] == whitelisted) then
        isWhitelisted = true
    end
	
	-- /\ -- permission check here (set "isWhitelisted") -- /\ --

	TriggerClientEvent('CinematicCam:receivePermissions', source, isWhitelisted)
end)

-- Return an array with all identifiers - e.g. ids["license"] = license:xxxxxxxxxxxxxxxx
function GetPlayerIdentifiersSorted(playerServerId)
    local ids = {
        ['license']    = "",
        ['steam']    = "",
        ['discord']    = "",
        ['xbl']        = "",
        ['live']    = "",
        ['fivem']    = "",
        ['name']    = "",
        ['ip']        = "",
    }

    local identifiers = GetPlayerIdentifiers(playerServerId)

    for k, identifier in pairs (identifiers) do
        local i, j = string.find(identifier, ":")
        local idType = string.sub(identifier, 1, i-1)

        ids[idType] = identifier
    end

    return ids
end

i need some help with this

Have you done all of this:

Because according to the error, it cannot find NativeUI

ok sorry for bothering i realized that i just did a stupid mistake … :zipper_mouth_face:|
thanks for replying! have a good day

1 Like

Hey its always giving me this error (I have the most recent NativeUI lua) and in the line its telling me there’s a problem its a line that only has “end”

This looks like there is something wrong with NativeUI. Did you switch to the one you are using in the fxmanifest AND the config?

Apart from that, did you change anything in the script? The error points to completely random lines compared to the version on Github.
115: pressedCount = 0
199: itemCamPrecision = NativeUI.CreateListItem(Cfg.strings.precision, precisions, currPrecisionIndex, Cfg.strings.precisionDesc)
The first one doesn’t make sense at all and the second one also should not be a problem D:

the script does not work I emptied the cash the native is up to date

Hey, I tried to put this and NativeUI Reloaded to my server. I put them correctly in the server, but when I try to start up the resources of them it gives me this error: Error

Then please take a look into your client log and look for any error related to the cinematiccam :slight_smile:

I think we were talking on Discord and this is fixed? If not, let me know again :slight_smile:

I’ve been experiencing the same issue with the SubMenu error.

Changing the fx_version in the manifest to Cerulean fixed it:

# cinemacam/fxmanifest.lua
fx_version 'cerulean'