Cube Scripts

Features

What the interface does and how to use it.

Commands#

code
/watchpanel          open the player list
/watchgame <id>      watch a player directly
/screen <id>         take a screenshot of a player
/unwatch             close every stream you have open

Every name is configurable through Config.Commands. All of them run the permission check first.

Tip

/watchgame with no argument opens the panel, so you only need to remember one command. Turn this off with Config.OpenPanelOnWatchCommand = false.

The player panel#

The list on the left shows everyone online.

  • Search by name, character name or server id
  • Sort by id, name or ping
  • Ping colour - green under 80ms, orange under 160ms, red above
  • LIVE badge on players you are currently watching
  • Ping colour as a quick health check on the connection

Double-click a row to open its stream, or use the icons:

IconAction
CameraScreenshot
MonitorWatch live — turns yellow while you are watching

At the bottom:

  • Watch listed - opens a stream for every player matching your current search
  • Tile all - arranges every open window in a grid
  • Close all - closes every window
Warning

Watch listed respects Config.MaxConcurrentStreams. With a filter that matches 20 players and a limit of 6, you get the first 6 and a message for the rest.

Windows#

Each stream opens in its own window.

ActionHow
MoveDrag the title bar
ResizeDrag any edge or corner
SnapDrag near a screen edge
Minimize─ button - collapses to a bar at the bottom
Maximize▣ button - fills the screen with margins
Close✕ button - ends the stream
FocusClick anywhere on the window

Windows cascade as they open so they never land exactly on top of each other, and clicking one brings it to the front. Double-clicking the title bar toggles maximize, and restoring always returns the window to its previous size and position.

Press Escape to close the whole interface and every stream with it.

Keeping an eye out while you play#

Hiding the player list with the ⟨ button gives the cursor back to the game while the stream windows stay open and keep playing. Press F2 to take the cursor back.

Tip

F2 is a standard FiveM key mapping, so each staff member can rebind it under Settings → Key Bindings → FiveM.

Screenshots#

A screenshot is a single frame, captured on demand, opened in its own window.

The frame never leaves your server unless you use the Discord export. See Server exports.

Performance#

The capture pipeline is reference-counted: it renders only while at least one admin is watching, and shuts down ten seconds after the last one leaves. An idle player pays no framerate cost at all.

While being watched, a player encodes video at Config.Quality.fps and Config.Quality.bitrate. The cost is theirs, not your server's - media never passes through it.

Note

One player watched by three admins runs three peer connections from a single shared capture pipeline, so the render cost is paid once no matter how many people are watching.