Studios
Abstractionhouse-3.jpg

Cutscene Tools

FreeAbstractionQBCore · Qbox · ESX
PAGE 09 OF 09  ·  SERVER → CUTSCENE TOOLSdocs.glitchstudios.dev
Browse docs

An optional staff tool for servers that run the Glitch Studios map and appearance resources. It plays a GTA cutscene on a player with the map streamed in around them, in a routing bucket of their own, then puts them back where they stood. The rest of the library does not need it.

When it loads#

It is off unless Config.Cutscenes.Enabled is true, or is 'auto' (the default) and glitch-mapHandler is installed. With it off, the cutscene files cost nothing.

The browser#

/cutsceneadmin opens a browser of the cutscene catalog with a search box, a Featured tab, previews from glitch-photos when it is running, and a button to put a chosen player in a scene. The failed-scene list comes from glitch-admin when it is running. Holders of Config.Cutscenes.Admin.EditAce can change the opening ACE from the gear in the panel. The change is saved and beats the config value until cleared.

Admin actions are ACE gated and allow one action per second per staff member.

What happens during a scene#

  1. The server records the player's spot and old routing bucket, then moves them to BucketBase + their id.
  2. The client fades out, streams the map, plays the scene and fades back in.
  3. When the client reports the end with a matching token, the server returns the bucket and the player's spot. If the client never answers, this happens after MaxMinutes. When the resource stops, players are put back too.
  4. A dropped player has their routing bucket restored and any pending look requests removed.

The return spot is always read on the server, never taken from the client.

Filler characters#

Online and DLC scenes have extra slots (MP_2 to MP_4). With fillers = 'random' or 'pick' the server asks other players' clients for their live look first, then falls back to saved looks in the tables named under Config.Cutscenes.Database. That fallback needs oxmysql. Table names are checked to letters, numbers and underscores before any query runs. Looks sent by a client are cut down to known keys.

Using it from another resource#

exports['glitch-abstraction']:PlayCutsceneFor(targetId, 'mp_intro_concat', { fillers = 'random', by = source })

AddEventHandler('glitch-abstraction:cutsceneStatus', function(target, by, state, why, name)
    print(target, state, why, name)
end)