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:
| Resource | Role |
|---|---|
| lb-phone | Host phone for the application |
| ox_lib | Shared library |
| oxmysql | Data 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:
ensure oxmysql
ensure ox_lib
ensure lb-phone
ensure lo_vcordWARNING
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.
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:
Config.Webhooks = {
-- Webhook for SERVER logs (messages, channels, roles, categories)
Server = "",
-- Webhook for DIRECT MESSAGE logs (DMs)
DM = "",
}- In Discord, open Channel settings → Integrations → Webhooks → New Webhook.
- Copy the webhook URL.
- Paste it between the quotes of
Config.Webhooks.Server(server logs) and/orConfig.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
- Start (or restart) your server.
- Check the console: no errors related to
lo_vcord,oxmysqlorlb-phone. - On a connected player, open the phone then the App Store: the Vcord application must appear.
- Install and open the application: the home page should load.
- Confirm the tables were created in the database (on first launch) on your MySQL server.
- 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
- Configuration — adapt
config.luato your server.