Skip to content

Installation ​

This page describes the installation of Vcord, the Discord-style messaging application for lb-phone.

Requirements ​

Before you begin, make sure the following resources are already installed and working on your server:

ResourceRole
lb-phoneHost phone for the application
ox_libShared library
oxmysqlData persistence

A voice system (PMA-Voice, Mumble, SaltyChat or TokoVOIP) is optional: it is only needed for voice channels and is detected automatically.

1. Add the resource ​

Place the lo_vcord folder in the [phone] directory of your resources, next to lb-phone:

resources/
└── [phone]/
    ├── lb-phone/
    └── lo_vcord/

TIP

Placing the application in the same [phone] folder as lb-phone ensures it starts after the phone and is automatically detected by the App Store.

2. Start order ​

In your server.cfg, start the resources in this order. Dependencies must always be started before Vcord:

cfg
ensure oxmysql
ensure ox_lib
ensure lb-phone
ensure lo_vcord

WARNING

If lo_vcord starts before its dependencies, the application will not register correctly with lb-phone. This order must be respected.

3. Database ​

No manual SQL import is required: Vcord creates its tables automatically on the resource's first start, via oxmysql.

NOTE

Just make sure oxmysql is correctly configured (the mysql_connection_string connection string in your server.cfg) and started before Vcord.

4. Interface (UI) ​

The interface is already compiled and shipped with the resource in ui/dist/. No build is needed: the fxmanifest.lua references the files in ui/dist/ directly.

lua
files {
    'ui/dist/index.html',
    'ui/dist/**/*',
    'locales/*.json'
}

The application registers with lb-phone as a custom app (AddCustomApp) at startup; it then appears in the phone's App Store.

TIP

You don't have any development tools (Node, npm…) to install. Download the resource, start it, and it's ready.

5. Discord webhooks (optional) ​

Vcord can send logs to Discord through two separate webhooks, configured in config.lua:

lua
Config.Webhooks = {
    -- Webhook for SERVER logs (messages, channels, roles, categories)
    Server = "",
    -- Webhook for DIRECT MESSAGE logs (DMs)
    DM = "",
}
  1. In Discord, open Channel settings → Integrations → Webhooks → New Webhook.
  2. Copy the webhook URL.
  3. Paste it between the quotes of Config.Webhooks.Server (server logs) and/or Config.Webhooks.DM (direct message logs).

NOTE

Leave a value empty ("") to disable the corresponding webhook. Which events are logged is controlled in Config.Logs (see Configuration).

Verification ​

  1. Start (or restart) your server.
  2. Check the console: no errors related to lo_vcord, oxmysql or lb-phone.
  3. On a connected player, open the phone then the App Store: the Vcord application must appear.
  4. Install and open the application: the home page should load.
  5. Confirm the tables were created in the database (on first launch) on your MySQL server.
  6. If you configured a webhook, send a test message and check that it appears in Discord.

If the application does not appear, double-check the start order and that the resource is indeed in [phone].

Next steps ​