Skip to content

Exports & API

Core Cinematics exposes a small set of state-query exports so other resources can detect when the user is inside the editor and suppress their own input handling (scroll-wheel binds, keymaps, target prompts, HUD elements, etc.) while a cinematic is being composed, recorded, or played back.

Catch-all

If you just want one check to disable your resource's input while the user is doing anything in Core Cinematics, use IsEditorActive. The granular probes below are there for resources that only need to react to a specific state.

Client Exports

clientexports['core_cinematics']:IsEditorActive()

Catch-all — returns true whenever the user is in any cinematics state: editor UI open, positioning mode, playback running, preview playing, or a solo/vehicle recording in progress. Use this to disable your resource's input handling for the full duration of any cinematic activity.

Returns: boolean
Example
lua
-- Suppress a scroll-wheel keymap while the user is in the editor
CreateThread(function()
    while true do
        Wait(0)
        if not exports['core_cinematics']:IsEditorActive() then
            -- your normal input logic here
        end
    end
end)
clientexports['core_cinematics']:IsEditorUIOpen()

Returns true while the cinematic editor NUI is open (the main project / timeline interface).

Returns: boolean
Example
lua
if exports['core_cinematics']:IsEditorUIOpen() then
    -- hide your HUD overlay while the editor is taking the screen
end
clientexports['core_cinematics']:IsInPositionMode()

Returns true while the user is placing or moving an in-world element (camera, marker, text-DUI, etc.) via the editor's position mode.

Returns: boolean
Example
lua
if exports['core_cinematics']:IsInPositionMode() then
    -- don't fire your own raycast / placement binds
end
clientexports['core_cinematics']:IsPlaybackActive()

Returns true while a project is playing back — either a full timeline playback or a single-clip preview.

Returns: boolean
Example
lua
if exports['core_cinematics']:IsPlaybackActive() then
    -- pause your own ambient timers / notifications so they don't appear mid-shot
end
clientexports['core_cinematics']:IsRecording()

Returns true while a solo or vehicle recording is being captured.

Returns: boolean
Example
lua
if exports['core_cinematics']:IsRecording() then
    -- skip non-essential UI prompts so they don't end up in the recording
end

Server Exports

Access to the editor is gated server-side. By default a player needs the core_cinematics.use ACE (or the generic command ACE that any admin who can run server commands already has). If your server runs a custom permission system instead of ACE, these exports let you grant editor access at runtime — no ACE setup required.

How access is resolved

A player is allowed into the editor if any of these is true: Config.RequireAcePermission = false, they hold the configured AcePerm/command ACE, or they have a live session grant from grantAccess. Grants and ACE work side by side — either one is enough.

Grants are per-session

A grant lives only for the current session and is cleared automatically when the player disconnects, so it never leaks to whoever next receives that source id. Re-grant on each connect (e.g. from your permission system's load event) if you need persistent access.

serverexports.core_cinematics:grantAccess(src)

Grants the given player editor access for the current session. Call this from your custom-core permission system when a player should be allowed in without an ACE. Returns false if the source is invalid or the player isn't online.

ParameterTypeDescription
srcnumberThe player server id (source) to grant access to.
Returns: boolean
Example
lua
-- Allow a player whose rank your own permission system approves
RegisterNetEvent('myperms:rankLoaded', function(rank)
    local src = source
    if rank == 'admin' or rank == 'creator' then
        exports.core_cinematics:grantAccess(src)
    end
end)
serverexports.core_cinematics:revokeAccess(src)

Removes a previously granted session access. Has no effect on ACE-based access — a player who still holds the ACE remains allowed. Returns false if the source is invalid.

ParameterTypeDescription
srcnumberThe player server id (source) to revoke the grant from.
Returns: boolean
Example
lua
-- Pull access when a player is demoted
exports.core_cinematics:revokeAccess(src)
serverexports.core_cinematics:hasAccess(src)

Returns true if the player currently has editor access from any source — ACE permission, the generic command ACE, or a live session grant. Useful for mirroring the editor's own gate in your code.

ParameterTypeDescription
srcnumberThe player server id (source) to query.
Returns: boolean
Example
lua
if exports.core_cinematics:hasAccess(src) then
    -- show your own "open cinematics" UI button
end

Animation Provider API

Core Cinematics also exposes an open contract that any animation / emote / walking-style resource can implement so its anims are captured during recordings and replayed on puppet peds. This is a separate integration layer — the recorder calls into the provider's exports, not the other way around.

For the full provider contract (required exports, state bag, discovery), see the Animations page.