Configuration Reference

Every setting in oxide-tablet, what it does in game, and its default value — plus how database-backed settings and the /tablet settings editor work.

Every setting in oxide-tablet, what it does in game, and its default value. Start with How Settings Work — the tablet saves its settings in your database, so editing the config file does not always do what you expect.

How Settings Work

oxide-tablet keeps its settings in your database (the MySQL database your server already uses), not only in the config file. This lets admins change settings in game with /tablet settings. It also changes how the config file behaves, so read this section before you edit anything.

The Short Version

  • The first time oxide-tablet starts, it copies every setting from shared/config.lua into a database table called oxide_settings.
  • From then on, the database decides. Editing shared/config.lua does not change a setting that is already saved in the database.
  • To change settings after the first start, join the server as an admin and type /tablet settings.
  • Changes you save in that menu are stored in the database straight away, and almost all of them work immediately, without a restart.

The First Start

Optional: open shared/config.lua (the settings file) and change anything you want before starting the resource for the first time. You can also skip this and do everything in game later.

Start your server.

oxide-tablet creates the oxide_settings table if it does not exist yet. Other Oxide resources may use the same table; each one keeps its own rows.

It copies every setting from shared/config.lua into that table. Every setting in the table is now what the tablet uses.

After the First Start

On every start after the first one, oxide-tablet reads its settings from the database. The config file is only used in these cases:

  • A setting missing from the database is copied in from shared/config.lua. This happens when a resource update adds a brand-new setting, or when you delete a setting's row from the database.
  • A new option inside an existing group is filled in from shared/config.lua. For example, if an update adds a new option under Config.Notifications, that one option is added and your other notification settings stay as they are.
  • Lists are never merged. Config.Items, Config.Home.wallpapers, Config.Store.preinstalled, Config.ModelSwaps, Config.MapLocations and Config.MapBlipOverrides are saved as a whole. After the first start, the whole list comes from the database.
  • The reset arrow in the in-game menu puts a setting back to the value in shared/config.lua (see below).

When you update oxide-tablet and the update replaces shared/config.lua, you lose nothing: your saved settings stay in the database.

Changing Settings in Game

Join your server with an admin account. See Admin Tools → Permissions for who counts as an admin.

Type /tablet settings in chat and press Enter. The Tablet Settings window opens. If your own tablet was open, it is put away first.

Pick a section in the left sidebar. Sections are grouped under Core, Appearance, Advanced and Apps.

Use the Basic and Advanced tabs at the top. Most settings are on Basic. Advanced only has the default keybind, the app load timeout and debug logging. Use the search box to find a setting by name.

Change a value. A changed badge appears next to it, and the bar at the bottom counts your unsaved changes.

Press Save Changes. A message confirms the save. If a value is not allowed, that setting shows the reason in red under its name. Your other changes are still saved.

Close the window with Close or ESC. Closing throws away changes you have not saved.

The reset arrow next to a setting puts it back to the value shared/config.lua had the last time the resource started. The reset is saved immediately; you do not need to press Save. For settings that contain several options (such as Home screen, which holds dock size, max pages and the wallpaper list), the reset puts back all of them together.

Using the Config File After the First Start

If you prefer editing shared/config.lua, you need one extra step to push your change into the database.

To apply one setting from the file:

Open shared/config.lua, change the value, and save the file.

Restart your server (or type restart oxide-tablet in the server console).

Join as an admin and type /tablet settings.

Find the setting and press its reset arrow. The value from your file is now saved and in use.

To load every setting from the file again:

This wipes every change made in the /tablet settings menu and replaces it with what is in shared/config.lua.

Stop your server.

Open your database in a database tool (such as HeidiSQL or phpMyAdmin) and run this query. It only removes oxide-tablet's settings; other resources' rows in the same table are untouched.

DELETE FROM oxide_settings WHERE resource = 'oxide-tablet';

Start your server. oxide-tablet copies every setting from shared/config.lua into the database again, as on the first start.

When Changes Take Effect

Where each setting is in the /tablet settings menu and when a saved change starts working:

SettingMenu section → labelTabTakes effect
Config.EnabledGeneral → Tablet enabledBasicImmediately. Turning it off closes every open tablet
Config.EscapeBehaviorGeneral → ESC inside an appBasicImmediately
Config.OpenKeyGeneral → Open keybind defaultAdvancedFor players joining for the first time after the change
Config.RequireItemTablet Items → Require an itemBasicThe next time a player opens the tablet
Config.ItemsTablet Items → Tablet itemsBasicImmediately for using items. A tablet that is already open keeps its apps until it is reopened
Config.DeviceDevices → Device identityBasicFor tablets that get their IMEI after the change
Config.BatteryDevices → BatteryBasicImmediately, including tablets that are already out. A new recharge rate is applied the next time a tablet is opened
Config.HomeHome Screen → Home screenBasicImmediately, including open tablets. A new image file needs a restart first (see Home Screen)
Config.StoreApp Store → App StoreBasicImmediately
Config.NotificationsNotifications → Push notificationsBasicImmediately
Config.HoldAnimationAnimation → Held poseBasicThe next time a player opens the tablet
Config.ModelSwapsCompatibility → Model replacementsBasicThe next time a player opens the tablet
Config.AppReadyTimeoutAdvanced → App load timeoutAdvancedThe next time an app is opened
Config.DebugAdvanced → Debug loggingAdvancedImmediately
Config.MapModeMap App → Map modeBasicImmediately
Config.MapEnabledMap App → Maps availableBasicImmediately
Config.MapAutoBlipsMap App → Include existing map blipsBasicImmediately
Config.MapLocationsMap App → LocationsBasicImmediately
Config.MapBlipOverridesMap App → Detected blip overridesBasicImmediately
Config.SettingsCommandNot in the menuSee Settings Not in the Menu

Settings Not in the Menu

Config.SettingsCommand is the only setting the in-game menu does not show. It is still copied into the database on the first start, so editing it in shared/config.lua afterwards does nothing, and it has no reset arrow.

To change it after the first start:

Change it in shared/config.lua and save the file.

Stop your server.

Run this query in your database tool:

DELETE FROM oxide_settings WHERE resource = 'oxide-tablet' AND setting_key = 'SettingsCommand';

Start your server. The value from your file is copied in.

Config File: shared/config.lua

Every setting below lives in shared/config.lua. Remember that after the first start, the /tablet settings menu is the place to change them (see How Settings Work). The ranges listed are what the in-game menu accepts.

General

SettingTypeDefaultDescription
Config.EnabledbooleantrueMaster switch. false stops the tablet items, the keybind and /tablet open from working, stops other resources from opening the tablet, and closes every open tablet
Config.DebugbooleanfalsePrints extra [oxide-tablet] lines in the server console and in players' F8 consoles. Also adds a Demo app and two demo widgets for testing. Leave it off on a live server
Config.OpenKeystring''Default key for the Open tablet keybind. '' means no key. Use a FiveM key name such as 'F9' (up to 20 characters). It only applies to players joining for the first time after you set it; everyone else sets their own key in Settings → Key Bindings → FiveM in the GTA pause menu
Config.EscapeBehaviorstring'home'What ESC does while an app is open. 'home' goes back to the home screen. 'close' puts the tablet away. ESC on the home screen always puts the tablet away
Config.AppReadyTimeoutnumber8000How long an app from another resource has to load, in milliseconds (8000 = 8 seconds). After that the tablet shows "didn't respond" with a Retry button. 1000 to 30000. An app can set its own wait, which replaces this value for that app and may be shorter
Config.SettingsCommandstring'/tablet settings'The command name quoted in the warning admins get when a model is missing (see Model Swaps). It does not rename the actual command. Not in the in-game menu
Config.Enabled = true
Config.Debug = false

Config.OpenKey = ''              -- no default key; players bind their own
Config.EscapeBehavior = 'home'   -- 'home' or 'close'
Config.AppReadyTimeout = 8000    -- 8 seconds

Config.SettingsCommand = '/tablet settings'

Tablet Items

These settings decide which inventory items open the tablet and which apps each item shows.

SettingTypeDefaultDescription
Config.RequireItembooleantruetrue: the keybind and /tablet open only work while the player carries one of the items below. false: anyone can open the tablet with the keybind or /tablet open, and their home screen, apps and settings are saved to their character. Using a tablet item works either way, and apps opened directly by other resources never need an item
Config.Itemstableone row for tabletThe items that open the tablet when used. One row per item, up to 50 in the menu
Config.Items[n].itemstring'tablet'The item's name, exactly as it appears in your inventory's item list (up to 40 characters)
Config.Items[n].appstable{}Empty: a normal tablet with the App Store. A list of app IDs: a curated tablet that shows only those apps
Config.RequireItem = true

Config.Items = {
    { item = 'tablet', apps = {} },
}

Each item must exist in your inventory's item list before it can be used. See Installation → Framework Setup for adding the tablet item to your inventory.

Normal Tablets and Curated Tablets

The apps list decides what kind of tablet an item is.

appsKindWhat players get
{} (empty)Normal tabletThe Settings app and the App Store, plus any apps in Config.Store.preinstalled. Players install the rest from the App Store. With Config.Store.enabled = false, every app the player is allowed to use appears automatically instead
{ 'app_id', ... }Curated tabletOnly the listed apps, plus the Settings app. There is no App Store, nothing can be installed or uninstalled, and Config.Store.preinstalled adds nothing

Rules for curated tablets:

  • Listed apps still follow their own job and gang rules. If an app only shows for police officers, a civilian holding the curated tablet sees only Settings.
  • An app ID for a resource that is not installed (or not started) simply does not appear.
  • You do not need to list tablet_settings: Settings is on every tablet.
  • Do not list app_store. The store would open, but every app in it would be locked.
  • When a player carries several tablet items, using an item opens that item. The keybind and /tablet open open the tablet in the lowest inventory slot, and that item's row decides the apps.

Example: A Work Tablet That Only Runs One App

Config.Items = {
    { item = 'tablet', apps = {} },                    -- normal tablet with the App Store
    { item = 'work_tablet', apps = { 'their_app' } },  -- curated: only that one app
}

Replace their_app with the app ID from the resource that adds the app, and work_tablet with your own item. The app only exists while that resource is running and supports the tablet.

Never list an item that another resource already uses on its own. If that resource handles the item as a usable item too, both react when the item is used. Check the other resource's config for an "open with an item" option and turn it off first.

Devices

Each tablet item gets its own 15-digit IMEI (serial number) the first time it is used. See Features → Tablet Devices and IMEI Numbers for how devices work.

SettingTypeDefaultDescription
Config.Devicetablesee belowOptions for tablet identity
Config.Device.stampDescriptionbooleantrueWhen a tablet gets its IMEI, also set the item's description to "IMEI" followed by the number. Inventories that show item descriptions then display it in the tooltip. This replaces any description the item already had. It only affects tablets that get their IMEI after you change it
Config.Device = {
    stampDescription = true,   -- show "IMEI 35..." in the item tooltip
}

Battery

A tablet with an IMEI has a battery. It loses charge while the tablet is out, and gets it back while the tablet is put away. At 0% the tablet puts itself away and won't open again until it has recharged. The level belongs to the tablet item, so it goes with the item when it changes hands.

Tablets without an IMEI have no battery and never run out: the keybind with Require an item off, a tablet another resource opened for its own app, and inventories that can't save an IMEI on items.

SettingTypeDefaultDescription
Config.Batterytablesee belowBattery options
Config.Battery.enabledbooleantrueTurn battery drain on or off. When off, tablets never lose charge and the battery in the status bar is decoration
Config.Battery.drainPerMinutenumber0.5Percent of charge lost for every minute the tablet is out. 0.5 empties a full battery in 3 hours 20 minutes. 0 to 100
Config.Battery.rechargePerMinutenumber1.5Percent of charge gained for every minute the tablet is put away. 1.5 fills an empty battery in about 67 minutes. At 0 a tablet never recharges on its own: a flat one then only comes back through /tablet wipe, or by turning battery drain off. 0 to 100
Config.Battery = {
    enabled = true,
    drainPerMinute = 0.5,      -- % lost per minute the tablet is out
    rechargePerMinute = 1.5,   -- % gained per minute it is put away; 0 = never
}

Recharging is worked out when the tablet is next opened, from how long it was away. It keeps counting while the player is offline and while the server is off. A flat tablet stays shut until it holds a whole percent again, which takes about 40 seconds at the factory rate.

Hold Animation

While the tablet is open, the player holds a tablet prop with an animation. Other players see it.

SettingTypeDefaultDescription
Config.HoldAnimation.enabledbooleantruefalse turns off both the pose and the prop
Config.HoldAnimation.dictstring'amb@code_human_in_bus_passenger_idles@female@tablet@base'The animation dictionary (the group the animation belongs to). If it cannot load, the tablet still opens, without the pose
Config.HoldAnimation.clipstring'base'The animation's name inside the dictionary
Config.HoldAnimation.flagnumber49How the animation plays. 49 loops it on the upper body only and lets the player move, so it works while walking and driving. 0 to 4096
Config.HoldAnimation.prop.modelstring'prop_cs_tablet'The prop model in the player's hand. Leave it empty for no prop
Config.HoldAnimation.prop.bonenumber60309The ID of the body bone the prop is attached to. 0 to 100000
Config.HoldAnimation.prop.offsetvector3vec3(0.03, 0.002, 0.0)Where the prop sits relative to the bone, in metres
Config.HoldAnimation.prop.rotationvector3vec3(10.0, 160.0, 0.0)The prop's rotation, in degrees
Config.HoldAnimation = {
    enabled = true,
    dict = 'amb@code_human_in_bus_passenger_idles@female@tablet@base',
    clip = 'base',
    flag = 49,                                -- loop + upper body + allow movement
    prop = {
        model = 'prop_cs_tablet',
        bone = 60309,
        offset = vec3(0.03, 0.002, 0.0),      -- metres from the bone
        rotation = vec3(10.0, 160.0, 0.0),    -- degrees
    },
}

In the in-game menu, Offset and Rotation each have three boxes: X, Y and Z.

Home Screen

These settings set limits on the home screen and add picture wallpapers. The layouts themselves belong to each tablet (or character), and players edit them in game.

SettingTypeDefaultDescription
Config.Home.dockSizenumber6The most apps the dock can hold. 0 to 6. 0 hides the dock
Config.Home.maxPagesnumber5The most home screen pages a player can have. 1 to 5
Config.Home.wallpaperstable{}Picture wallpapers players can choose, shown next to the 8 built-in presets. Up to 30
Config.Home.wallpapers[n].idstringnoneA short unique name: letters, numbers, - and _ (up to 32 characters). Players' saved choice points to this name
Config.Home.wallpapers[n].labelstringnoneThe name shown under the picture in the wallpaper picker (up to 40 characters)
Config.Home.wallpapers[n].urlstringnoneA file name in the resource's wallpapers/ folder (such as skyline.jpg), or a full https:// web address (up to 200 characters)
Config.Home = {
    dockSize = 6,
    maxPages = 5,
    wallpapers = {},   -- { id = 'skyline', label = 'Skyline', url = 'skyline.jpg' }
}
  • Values above the limits are treated as the limit (a dockSize of 10 acts as 6).
  • Lowering dockSize or maxPages does not delete anyone's apps. Apps that no longer fit move into the App Library, under Not on home screen, and drop back onto a page the next time the player edits their home screen. Widgets on a removed page are taken off and can be added again.

Adding a Wallpaper Image

Pick an image. A wide 16:10 picture around 1600x1000 pixels fills the screen without cropping.

Name the file using only letters, numbers, - and _, with a lowercase .png, .jpg, .jpeg or .webp ending. For example: skyline.jpg.

Copy the file into the wallpapers folder inside oxide-tablet.

Restart your server (or type restart oxide-tablet in the server console) so the new file can be loaded.

Join as an admin, type /tablet settings and open Home Screen. Under Wallpaper images, press Add and fill in:

  • Id: a short name such as skyline
  • Label: the name players see, such as Skyline
  • Image: the file name, such as skyline.jpg

Press Save Changes. To check it, open a tablet, turn on edit mode, and press Wallpaper. Your picture is in the Images row.

Things to know:

  • Only https:// web addresses work. A row with an http:// address is left out of the picker.
  • A row with an unusable image address is left out of the picker. With Config.Debug on, a console line names it. A row with a missing or invalid id is left out silently.
  • Keep the id the same once players have picked the image. Changing the file or web address of a row is fine: players keep the wallpaper and see the new picture.
  • If you remove a row or change its id, players who picked it go back to the default wallpaper.
  • Players can only choose from your list and the presets. They cannot enter their own links.

App Store

These settings control how apps get onto tablets. See Features → The App Store for what players see.

SettingTypeDefaultDescription
Config.Store.enabledbooleantruetrue: each normal tablet has an App Store and players install the apps they want. false: the App Store is removed, and every app a player is allowed to use appears on their tablet automatically
Config.Store.preinstalledtable{}App IDs installed on every normal tablet. They show as Built-in in the store and players cannot uninstall them
Config.Store = {
    enabled = true,      -- false = no store; every allowed app is installed
    preinstalled = {},   -- for example { 'tablet_map' }
}
  • Preinstalled apps still follow their app's rules. An app limited to police only shows for police, even when preinstalled.
  • Curated tablets ignore both settings. An item with an apps list shows exactly that list (see Tablet Items).
  • Turning the store off keeps players' installs. They come back if you turn the store on again.
  • Unknown IDs do nothing. An ID for a resource that is not installed is ignored.
  • App IDs are listed in App ID Reference.

How Items and the App Store Work Together

Config.Store.enabledItem appsResult
true{}App Store on the tablet. Preinstalled apps are locked in; players install the rest
false{}No App Store. Every app the player is allowed to use is on the tablet
true or false{ 'app_id', ... }No App Store. Only the listed apps the player is allowed to use, plus Settings

Maps

These settings control the built-in Maps app. See Maps App for full details on how Maps, locations and blip overrides work. Adding locations in game is easiest: the menu has a placement button that lets you pick the spot in the world instead of typing coordinates.

SettingTypeDefaultDescription
Config.MapEnabledbooleantrueOffer the Maps app (app ID tablet_map). false closes and hides Maps everywhere; players' installs are kept
Config.MapAutoBlipsbooleantrueAlso list the location blips each player already has on their own game map
Config.MapModestring'inherit'How the map handles Cayo Perico: 'inherit' uses o-link's setting, 'combined' shows both islands on one map, 'separate' shows separate island views, 'disabled' hides Cayo Perico
Config.MapLocationstable{}Public places everyone with Maps sees. Up to 100
Config.MapBlipOverridestable{}New names, descriptions, icons and colours for blips players already have on their game map. Up to 100
Config.MapEnabled = true
Config.MapAutoBlips = true
Config.MapMode = 'inherit'    -- 'inherit', 'combined', 'separate' or 'disabled'
Config.MapLocations = {}
Config.MapBlipOverrides = {}

Admins can also change the map mode with the oxide-tablet:mapmode command. See Admin Tools.

Location Rows (Config.MapLocations)

FieldTypeRequiredDescription
labelstringYesThe place's name (up to 60 characters)
iconstringNoOne of the icons below. Default 'fa-solid fa-location-dot'
colorstringNoOne of the colours below. Default '#60a5fa' (blue)
descriptionstringNoA short description (up to 200 characters)
coordsvector3YesThe place's X, Y and Z position

Override Rows (Config.MapBlipOverrides)

Create these with the Detected blip overrides tool in /tablet settings, which fills in the matching fields for you.

FieldTypeRequiredDescription
spritenumberYesThe original blip's sprite number (1 to 1024)
coordsvector3YesThe original blip's position. Matches within 2 metres sideways and 3 metres up or down
labelstringYesThe new name (up to 60 characters)
descriptionstringNoThe new description. Empty keeps the detected one
iconstringNoOne of the icons below. '' keeps the game blip's icon
colorstringNoOne of the colours below. '' keeps the game blip's colour

Allowed Icons and Colours

Icon valueShown as
'fa-solid fa-location-dot'Location
'fa-solid fa-store'Shop
'fa-solid fa-hospital'Hospital
'fa-solid fa-square-parking'Parking
'fa-solid fa-utensils'Restaurant
'fa-solid fa-gas-pump'Fuel
'fa-solid fa-building-columns'Bank
'fa-solid fa-shield-halved'Police
'fa-solid fa-car'Vehicle
'fa-solid fa-wrench'Mechanic
'fa-solid fa-house'Home
'fa-solid fa-briefcase'Work
'fa-solid fa-shirt'Clothing
'fa-solid fa-scissors'Barber
'fa-solid fa-martini-glass'Bar
'fa-solid fa-plane'Airport
'fa-solid fa-anchor'Marina
'fa-solid fa-star'Point of interest
'fa-solid fa-pen-nib'Tattoo studio
'fa-solid fa-crosshairs'Gun shop
'fa-solid fa-film'Cinema
'fa-solid fa-spa'Wellness
'fa-solid fa-truck'Trucking
'fa-solid fa-paw'Animals
Colour valueShown as
'#60a5fa'Blue
'#34d399'Green
'#f87171'Red
'#facc15'Yellow
'#c084fc'Purple
'#f472b6'Pink
'#e5e7eb'White

Notifications

These settings control the notifications apps post to the tablet. Players fine-tune what they receive in the Settings App; these are the server-wide switches and limits.

SettingTypeDefaultDescription
Config.Notifications.enabledbooleantruefalse stops every app from posting notifications. The Settings app tells players notifications are off on this server
Config.Notifications.maxStorednumber100The most notifications each player keeps. Beyond this, the oldest are removed. 10 to 500
Config.Notifications.toastDurationnumber5000How long a banner or bubble stays on screen, in milliseconds (5000 = 5 seconds). 1000 to 30000
Config.Notifications.showWhenClosedbooleantrueShow a small bubble at the bottom right of the screen when a notification arrives while the tablet is put away
Config.Notifications.sound.enabledbooleantruePlay a sound with banners and bubbles. false also greys out the Sound switch and volume slider in players' Settings app
Config.Notifications.sound.filestring'notification.mp3'The sound to play. The tablet ships one sound, notification.mp3. To use your own, put an .mp3 file in the tablet's web/dist/sound folder (next to notification.mp3), restart the server, and type its file name here. A file name that does not exist plays nothing
Config.Notifications.sound.volumenumber0.5The loudest the sound can be, from 0 (silent) to 1 (full volume). Each player's volume slider scales down from this
Config.Notifications = {
    enabled = true,
    maxStored = 100,        -- per player; oldest removed first
    toastDuration = 5000,   -- 5 seconds
    showWhenClosed = true,  -- bubble while the tablet is put away
    sound = { enabled = true, file = 'notification.mp3', volume = 0.5 },
}

Notifications are kept in each player's game only, never in the database. They are cleared when the player logs out or switches character.

Model Swaps

Some game builds are missing models that newer builds have. oxide-tablet loads one model: the tablet prop in the player's hand (Config.HoldAnimation.prop.model, which is prop_cs_tablet by default).

If a player's game cannot load that model:

  • The tablet still opens, without the prop. Nothing freezes.
  • The player's F8 console shows a warning naming the model.
  • Online admins get a notification like: [oxide-tablet] model "prop_name" is not on this game build. Set a replacement in /tablet settings.
  • Nothing is replaced automatically. You choose the replacement.
SettingTypeDefaultDescription
Config.ModelSwapstable{}Replacement models. One row per model. Up to 100
Config.ModelSwaps[n].fromstringnoneThe model to replace, spelled exactly as in the warning
Config.ModelSwaps[n].tostringnoneA model your game build has
Config.ModelSwaps = {}
-- { from = 'prop_cs_tablet', to = 'prop_some_other_tablet' }

To add a replacement in game:

Type /tablet settings and open Compatibility.

Under Model replacements, press Add.

In Replace, type the model name from the warning. In With, type a model your game has.

Press Save Changes. The next time a player opens the tablet, the new model is used.

You can also change Config.HoldAnimation.prop.model directly instead of adding a swap. Both work.

App ID Reference

App IDs are the short names you put in Config.Items[n].apps and Config.Store.preinstalled.

AppApp IDNotes
App Storeapp_storeBuilt in. Do not put it in a curated item's list
Settingstablet_settingsBuilt in, on every tablet. No need to list it
Mapstablet_mapBuilt in. Needs Config.MapEnabled

Apps from other resources have their own IDs, set by those resources. Check that resource's documentation for its app ID.

Next Steps