Installation
From download to a working app on the phone, in five steps.
Before you start
- LB Phone and oxmysql installed and working on the same database, plus your framework if you use one.
- LB Phone media upload configured with the provider you choose.
- Access to edit server.cfg and restart the server.
Download the resource
Go to My account and download the RVT Chat .zip. Your license key is already filled in Config.License inside token.lua, at the root of the resource. Do not edit that file.
Copy the folder to your server
Extract the zip into your resources folder. The folder name must stay rvt_chat.
resources/ [rvt]/ rvt_chat/ fxmanifest.lua token.lua (license, filled by the store - do not edit) shared.lua (settings) client.lua server.lua open/bridge.lua (framework and permission bridge) sql/001_rvt_chat.sql sql/002_owner_binary.sql web/dist/Database
New install: review and run sql/001_rvt_chat.sql in your SQL client before starting. The file only creates new tables (rvt_chat_*) and never touches LB Phone tables. If tables are missing on first start, the resource tries to run that file by itself; if it cannot, the app stays unavailable and the console says so. Database from an earlier version: see Updating.
Add it to server.cfg
rvt_chat must start after all its dependencies.
server.cfg ensure oxmysql # ensure your framework here, if you use one (qb-core, es_extended, vrp...) ensure lb-phone ensure pma-voice # optional: only for group calls ensure rvt_chat # Optional: Cloudflare TURN for group video behind strict NAT (use set, never setr) # set rvt_chat_turn_token_id "<TURN key id>" # set rvt_chat_turn_api_token "<TURN API token>" # Moderation (every mode except creative): grant the ACE to your admin group # add_ace group.admin rvt_chat.admin allowRestart and test
- Restart the server and look for this in the console: [rvt_chat] Pronto. Schema v2.
- Join the game, open the phone and check the RVT Chat app.
- Send a message to another player.
Group voice needs a pma-voice change
Without it the app works normally, but group voice calls are unavailable. pma-voice must expose the privateCallNamespace, setPrivateCall and setCallMuted exports (example below), support muting on the client and stop transmitting when setCallMuted is called.
Show the pma-voice change
-- pma-voice, server side
exports("privateCallNamespace", function()
return { 800000, 899999 } -- private call channels reserved for rvt_chat
end)
exports("setPrivateCall", function(source, channel)
-- put the player in the private call channel (0 removes the player)
return true
end)
exports("setCallMuted", function(source, muted)
-- stop or resume this player's transmission to the call
return true
end)Reserve an exclusive range in Config.Calls.channelBase and channelRange and allow the name rvt_chat in your voice provider admission list. After changing pma-voice, restart rvt_chat too.
Updating
- Back up the whole database (the app tables start with rvt_chat_).
- Stop the resource, replace the files and reapply your changes to shared.lua and open/bridge.lua. The license (token.lua) comes filled in on the new download.
- On an existing database, run sql/002_owner_binary.sql manually before starting. The migration is not automatic: check each statement, because ALTER TABLE commits immediately and has no rollback.
- Start the resource. Connected players rebuild their session on their own.
