Language

Currency

EUR €

Prices are in EUR. The Tebex checkout converts to your local currency.

Scripts

XSmartSurface

Install and configure XSmartSurface, the FiveM script that turns TVs, projectors, billboards and walls into live screens.

Version
1.7.0
Updated

This guide covers

XSmartSurface turns any flat surface of the GTA V world into a live screen for images, animated GIFs, synced videos and live streams from YouTube, Twitch, Vimeo and Kick, a shared whiteboard and PDF presentations. This guide takes you from the download to the first working screen. The complete manual ships inside the resource as README.md.

Requirements

What Notes
FiveM server on GTA V Legacy Recent artifacts, with OneSync on (on or infinity)
oxmysql MySQL 8.0.16+ or MariaDB 10.4+
ox_lib Required
A target script Required: ox_target or qb-target. Screens are opened through it. qb-target runs only on QBCore and needs PolyZone
Framework Optional. ESX, QBCore or Qbox. Without one the resource runs standalone

Node.js is not needed: the interface ships already built.

Installation

  1. Copy the folder xsmartsurface into your resources directory. Keep the name.

  2. Import the database. Run sql/startup.sql on the database oxmysql uses. It creates four xss_* tables and touches nothing else. Running it twice is safe.

  3. Edit server.cfg. Order matters, because the resource needs its dependencies started first.

    ensure oxmysql
    ensure ox_lib
    ensure es_extended        # or qb-core / qbx_core, or leave it out for standalone
    ensure ox_target          # or qb-target, after qb-core and PolyZone
    ensure my_props           # any resource that streams props you listed in config/models.lua
    ensure xsmartsurface
    
    setr ox:locale en         # en, it, fr or de
    
    add_ace group.admin xsmartsurface.admin allow
    add_ace group.admin xsmartsurface.create allow

    On QBCore the admin groups are qbcore.admin and qbcore.god, so add them too:

    add_ace qbcore.admin xsmartsurface.admin allow
    add_ace qbcore.god xsmartsurface.admin allow
    add_ace qbcore.admin xsmartsurface.create allow
    add_ace qbcore.god xsmartsurface.create allow
  4. Start the server and read the console. A healthy start ends like this:

    [xsmartsurface] [info] database ready, schema checked on 4 tables
    [xsmartsurface] [info] started: framework esx, persistence hybrid, admin ace (0 from file)
    [xsmartsurface] [info] surfaces published: 0 of 0 loaded, 0 states restored, 0 groups, 0 roles

    Any [error] line says what is missing and how to fix it. The most common ones are listed under Troubleshooting.

First steps

Log in as an admin and create your first screen. There are two ways.

From a prop. Walk up to one of the props listed in config/models.lua (a flat TV, a desk monitor), aim at it with your target script and pick Register surface. The outline of the whole prop appears. Press Enter to use all of it, or click two opposite corners of the real screen so the content stays inside the frame. A page opens: give the screen a name, choose the group it belongs to and tick what it may show.

On a wall. Type /xss_create_surface, or press Create surface in the admin panel. Aim at a wall and click to set the first corner, move to size the rectangle, then click again to confirm. After the first corner, Q and E rotate the rectangle, 1° per step or 0.1° while holding Shift.

In both editors the mouse wheel moves the rectangle towards you or back, 1 cm per step, up to 1 m in front of the wall. Use it for a projector screen that hangs in front of the wall.

Then walk up to the screen, pick Use surface in the target menu and the menu opens. Turn it on and put something on it.

Press F7 or type /xss_admin to open the admin panel: every screen of the server, with search, sorting, teleport and moderation.

Configuration

Every config file is commented field by field. Wrong values do not break the resource: they are corrected at start and listed in the console.

File Loaded by What is in it
config/shared.lua Server and clients Distances, texture sizes, upload limits, video, board, presentations, player animations, menu colours
config/models.lua Server and clients Which props can become a screen
config/server.lua Server only Persistence, storage, admins, creation rights, member keys
config/admins.json Server only Admin identifiers, used with the json or both mode

config/server.lua and config/admins.json are never sent to players. Their values reach the panel of an admin only, on request.

Changing settings in game

The Server settings tab of the admin panel edits the four files above without opening them. Whoever can open the panel can use it.

  • Save writes only the files you touched. Menu colours and the admin list apply at once. Every other value waits for a restart of the resource.

  • Save and restart saves and restarts the resource for everyone. It needs these lines in server.cfg, followed by a server restart:

    add_ace resource.xsmartsurface command.ensure allow
    add_ace resource.xsmartsurface command.stop allow
    add_ace resource.xsmartsurface command.start allow
  • A file saved from the tab is rewritten from a template: your values are kept, comments you wrote by hand are lost. A file edited by hand is first copied next to itself with .bak at the end of its name.

  • A save that would leave you without admin rights is refused.

Admins

ServerConfig.Admin.mode in config/server.lua decides who is an admin.

Mode Admin is
ace (default) Whoever has the ACE xsmartsurface.admin
json Whoever has an identifier listed in config/admins.json
both Either of the two

config/admins.json looks like this, and is reloaded with the console command xss_reload_admins:

{
  "identifiers": [
    "license:0123456789abcdef0123456789abcdef01234567",
    "discord:123456789012345678"
  ]
}

Creating screens has its own ACE, xsmartsurface.create, so you can hand it to builders who are not admins. Set ServerConfig.Create.mode = 'admin' to keep it to admins.

Adding props

Every entry in Config.Models arms a target option on that model, everywhere it exists on the map. Nothing is saved until an admin registers one.

Config.Models = {
    prop_tv_flat_01 = { label = 'Flat TV', features = 11 },
    prop_monitor_01a = { label = 'Desk monitor', features = 9 },
}
  • The key is the full model name.
  • features is where the checkboxes start when an admin registers the prop: 1 images, 2 video, 4 board, 8 presentation, added up.
  • Leave screenRect out unless every copy of the model should start from the same rectangle.
  • Keep only the props your map really has. Every entry is a target option on every client.

Values you are likely to change

Setting Default Why you would change it
Config.Interaction.target 'auto' 'auto' uses ox_target when it is started and qb-target otherwise. 'ox_target' or 'qb-target' forces one. With qb-target the options stop at Config.MaxDistance of qb-target (7 by default), and the three option labels must be three different texts
Config.Surface.offMode 'black' 'white' paints a switched off screen white, 'original' shows the prop’s own texture
Config.Surface.maxTextureSize 1280 Sharper content on big screens, at a memory cost
Config.Dui.maxActive 2 Videos, animated GIFs, live boards and annotated presentation pages playing at once per client
Config.Video.providers { 'youtube' } Sites players may play links from: 'youtube', 'twitch', 'vimeo', 'kick'. Also in the Server settings tab
Config.Video.twitchAcceptLabels false true presses the Start Watching notice of labelled Twitch channels (most GTA roleplay streams) for players near the screen
Config.Video.audibleDistance 25.0 How far a video can be heard
Config.Video.muteOutsideInterior true Stops sound leaking from inside a building to the street
Config.Video.enabled, Config.Board.enabled, Config.Slides.enabled true Switch a whole feature off on the server
Config.Board.strokeIntervalMs 200 Milliseconds between two batches of strokes while drawing, from 100 to 1000. Lower looks smoother to who watches and costs more to who draws
Config.Slides.tools.enabled true false removes the Manage button from presentations and keeps only the page buttons
Config.Groups.maxSurfacesPerGroup 30 Bigger groups
Config.Animations.enabled true false keeps players still while they use a screen
ServerConfig.Storage.resource nil Store media in another resource, see below

Keeping media safe across updates

By default media are written inside the resource, in data/media. If you replace the whole folder on update, you lose them. To avoid that, keep them in a separate resource:

  1. Create a resource, for example xsmartsurface_data, with an empty data/media folder and a minimal fxmanifest.lua.

  2. Set ServerConfig.Storage.resource = 'xsmartsurface_data'.

  3. Add these lines to server.cfg, with the data resource before xsmartsurface:

    add_filesystem_permission xsmartsurface write xsmartsurface_data
    ensure xsmartsurface_data

Languages

The language comes from the ox:locale convar, like every ox resource: setr ox:locale it. English, Italian, French and German are included. To add one, copy locales/en.json to locales/<code>.json, translate the values (never the keys) and set the convar to that code.

Commands

In game

Command Who What
/xss_settings Everyone Personal settings: theme, menu position, mute every screen, do not play videos, block single video sites
/xss_admin, key F7 Admins Admin panel
/xss_create_surface Who has xsmartsurface.create Drawing editor
/xss_pose Admins Calibrates the props held in the animations
/xss_draw Everyone Prints to the F8 console how many screens your client draws and culls
/xss_video Everyone Prints to the F8 console the videos of your client, with the volume and the reason of any mute

Server console

Command What
xss_config Framework, database, distances, groups and every screen
xss_perms <id> For an online player: admin or not, member keys and permissions group by group
xss_group list Groups from the console. Also create <name> and delete <id>
xss_surface <id> on Quick moderation of a screen. Also off, disable and enable
xss_reload_admins Reloads config/admins.json
xss_prune_members <days> Counts members who have not joined for that many days (minimum 7). Add confirm to delete them
xss_purge_member <identifier> Removes a character from every role, for data deletion requests

Updating

A new version replaces the code, not your data. Before copying the new folder over the old one:

  1. Keep your config/ folder, and your locales/ if you changed them. Compare them with the new ones afterwards: a new version may add settings, and the console lists any value it had to correct.
  2. Keep data/media, or move the media to their own resource once and for all.
  3. Read the release notes for any SQL to run. The resource never changes the database by itself, and tells you on start if a column is missing.

Coming from 1.0.0, run sql/upgrade-1.1.0.sql once. Later versions up to 1.7.0 need no SQL. When you update to 1.5.0, 1.6.0 or 1.7.0, run refresh before ensure xsmartsurface: the list of files in the manifest changed. From 1.6.0 the resource works with qb-target as well as ox_target, and ox_target is no longer a hard dependency: keep the ensure of your target script before ensure xsmartsurface. Your own config/shared.lua needs no edit: without Interaction.target the resource uses auto, and without Video.providers only YouTube links play. Add other sites in the Server settings tab.

Troubleshooting

In the server console

Console says Fix
the database schema is out of date, N items missing Import sql/startup.sql, then restart the resource
oxmysql did not become available oxmysql must start before xsmartsurface, and its connection string must work
no target script is started Ensure ox_target or qb-target before xsmartsurface
Interaction.target is ... but ... is not started The target script named in config/shared.lua is not running. Start it before xsmartsurface, or set Interaction.target = 'auto'
OneSync is "off" Enable OneSync in the server settings or with set onesync on
folder xsmartsurface/data/media not readable Create the folder. With Storage.resource, check the filesystem permission line
framework ... detected but not ready The framework took longer than ServerConfig.Bridge.readyTimeoutMs to start. Raise it, or check the framework’s own errors
another copy of this resource is running as "..." The resource is started twice under two folder names. Stop and remove the old copy
... values corrected automatically A config value was wrong. The lines below say which, and what is used instead
server settings: ... could not be written The resource may not write into its config folder. Fix the folder permissions on the host. Nothing was changed
Access denied for command stop after Save and restart One of the three add_ace resource.xsmartsurface command... lines is missing in server.cfg. See Changing settings in game

In game

Problem Fix
No target option on a prop The model is not in config/models.lua, or its name is not the full model name. The line ready: in the F8 console says which target script is in use
With qb-target one of the options is missing Two of the three labels in Config.Interaction have the same text. Give them three different texts
The admin panel does not open The player is not admin (xss_perms <id> says why), or became admin while online: reconnect
Save and restart is greyed out The resource may not restart itself. The tab lists the add_ace lines to add to server.cfg
A saved value does not take effect It is waiting for a restart: restart the resource. Only menu colours and the admin list apply at once
Content spills over the frame of a prop Adjust surface in the target menu and trace the real screen
A screen floats in front of the wall, or sits behind a prop Adjust surface, then the mouse wheel to move it
A YouTube video does not play The uploader has blocked embedding on other sites. Nothing can be done on the server
A link is refused with Links from this site are not enabled on this server Add the site to Config.Video.providers
A Twitch channel stops on Start Watching The channel has a content label. Set Config.Video.twitchAcceptLabels = true
A Kick channel sounds the same at any screen volume Kick only lets the resource switch the sound on or off. Set the screen to 0 for silence
A video stays black for one player while others see it /xss_video in that player’s F8 console lists the browsers and what each one plays. If both are busy with closer screens, raise Config.Dui.maxActive
Sound heard through floors Lower Config.Video.maxHeightDifference
The file window does not open a second time A FiveM limit: the game opens it once per session. Paste the image with Ctrl+V; for a PDF, restart the game

For anything else, xss_config on the server and /xss_draw or /xss_video on the client print the state the resource is in.

Your cart

    Type to search products and guides