> For the complete documentation index, see [llms.txt](https://grp-development.gitbook.io/titan-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://grp-development.gitbook.io/titan-scripts/resources/titan-tablet/configuration.md).

# Configuration

Every setting in shared/config.lua and what it does.

Every setting lives in `ttn-tablet/shared/config.lua`. Your framework, inventory and banking script are detected by `ttn-bridge`, so there is nothing to set for those. Restart `ttn-tablet` after you change a setting.

The pages in this section cover the bigger features. The smaller settings are on this page.

#### General

```lua
Config.Debug = false
Config.Item = 'tablet'
Config.OpenKey = ''
Config.Language = 'en'
Config.MailHost = 'titan.com'
```

| Setting    | Description                                                                                                                                        |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Debug`    | Prints what the tablet is doing to the F8 and server console, and adds the test commands. Turn it off on a live server.                            |
| `Item`     | Item a player needs to use the tablet. Using it opens and closes the tablet.                                                                       |
| `OpenKey`  | Optional default key that opens the tablet, for example `'F2'`. Players still need the item. Empty opens it from the inventory and `/tablet` only. |
| `Language` | Language file from the `locales` folder. To add a language, copy `en.json`, translate it and set its name here.                                    |
| `MailHost` | The part after the @ in tablet mail addresses while the tablet is not synced with TITAN Phone.                                                     |

#### Apps

Turn any built-in app off for every tablet.

```lua
Config.Apps = {
    Mdt = true,
    Mail = true,
    Messages = true,
    Notes = true,
    Photos = true,
    Camera = true,
    Maps = true,
    Sign = true,
    Register = true,
    Blueprint = true,
    Cams = true,
    Files = true,
    Calculator = true,
    Settings = true,
}
```

Some apps also show only to the right players: the MDT to the jobs in [MDT](https://grp-development.gitbook.io/titan-scripts/resources/titan-tablet/configuration/mdt), Register to employees of a listed business, Cams to players who can view at least one camera, and Messages to players with a linked TITAN Phone.

#### TITAN Phone sync

When `ttn-phone` runs on your server, the tablet can share its data with the phone. A player's phone and tablet then show the same inbox, gallery and notes.

```lua
Config.Sync = {
    Enabled = true,
    Resource = 'ttn-phone',
    Mail = true,
    Photos = true,
    Notes = true,
    Messages = true,
}
```

| Setting    | Description                                                             |
| ---------- | ----------------------------------------------------------------------- |
| `Enabled`  | `false` keeps the tablet completely separate from the phone.            |
| `Resource` | Name of your TITAN Phone resource.                                      |
| `Mail`     | One inbox on phone and tablet.                                          |
| `Photos`   | One gallery. Photos and clips taken on the tablet show up on the phone. |
| `Notes`    | The same notes on both devices.                                         |
| `Messages` | Show the phone's chats on the tablet.                                   |

{% hint style="info" %}
With sync on, a player without a linked phone sees a "link your phone" screen in the synced apps instead of separate tablet data.
{% endhint %}

#### Sharing

Players can send a photo, note, board or location to a player standing next to them.

```lua
Config.Share = {
    Distance = 5.0,
    Cooldown = 3,
    Expire = 30,
}
```

| Setting    | Description                                                         |
| ---------- | ------------------------------------------------------------------- |
| `Distance` | How close the other player has to stand, in metres.                 |
| `Cooldown` | Seconds a player waits between two shares.                          |
| `Expire`   | Seconds the other player has to accept before the share is dropped. |

#### Maps

```lua
Config.Maps = {
    SavedLimit = 50,
    RecentLimit = 5,
    Places = {
        { id = 'p1', cat = 'police', name = 'Mission Row Police Station', x = 441, y = -982, area = 'Mission Row' },
    },
}
```

| Setting       | Description                                                                                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SavedLimit`  | Most saved pins per character. Home and Work have their own slots.                                                                                                                                                       |
| `RecentLimit` | How many recently opened places the app remembers.                                                                                                                                                                       |
| `Places`      | Public places on the map, with GTA world coordinates. `cat` is one of `police`, `hospital`, `garage`, `fuel`, `store`, `bank`, `food`, `clothing`, `weapons`, `dealer` or `landmark`; anything else shows as a landmark. |

#### Custom apps

```lua
Config.CustomApps = {
    Enabled = true,
    MaxApps = 24,
    AllowExternalUi = false,
}
```

See [Custom apps](https://grp-development.gitbook.io/titan-scripts/resources/titan-tablet/custom-apps).
