Skip to content

Installation ​

Requirements ​

Resource
Requiredoxmysql
Required (one)qbx_core, qb-core or es_extended (ESX Legacy)
Optional voicepma-voice, saltychat or yaca-voice. Without one, calls are UI-only
Optionalox_inventory (phone item, gated apps)
Optionalscreenshot-basic (camera)

Node 18+ to build the NUI once.

Steps ​

  1. Put the resource in your resources folder as np_phone.
  2. Build the NUI:
    sh
    cd web && npm ci && npm run build
  3. Start it after its dependencies:
    cfg
    ensure oxmysql
    ensure qbx_core        # or qb-core / es_extended
    ensure pma-voice       # optional: or saltychat / yaca-voice
    ensure ox_inventory    # optional
    ensure screenshot-basic # optional: camera
    ensure np_phone
  4. Database: the tables are created automatically on first start (CREATE TABLE IF NOT EXISTS, all prefixed phone_). The sql/*.sql files are reference copies only.
  5. Phone item (only with Config.RequireItem = true): add a phone item to your inventory, in ox_inventory data/items.lua, qb shared/items.lua, or the ESX items table.
  6. Camera: start screenshot-basic and set an upload key (see below).
  7. Darkchat needs a vpn item (Config.StoreApps).
  8. Admins (optional): let them delete other players' Chirps and ads:
    cfg
    add_ace group.admin np_phone.admin allow

Secrets in server.cfg ​

Never write secrets into the config files. Use set, not setr, so they aren't sent to clients:

cfg
set np_phone:upload_provider "fivemanage"   # or "discord" / "none"
set np_phone:fivemanage_token "your-api-key"
set np_phone:discord_webhook "https://discord.com/api/webhooks/..."
set np_phone:passcode_pepper "long-random-string"  # extra secret mixed into passcode hashes

FiveManage is the recommended upload provider

The API key stays on the server. The server hands the client a short-lived presigned URL instead. Discord webhooks can't be presigned, so client uploads to Discord are disabled unless you opt in. See Media → Upload security.

Opening the phone ​

F1 by default (Config.OpenKey), or the /phone command (Config.Command). Players can rebind the key under Settings → Key Bindings → FiveM.

Troubleshooting ​

SymptomFix
Blank phoneweb/dist is missing. Build the NUI
"You don't have a phone."Config.RequireItem = true and the player has none of Config.ItemNames
Calls connect but there's no audioNo voice bridge loaded. Start the voice resource before np_phone, or check Config.Voice
pma-voice calls cross with other scripts' callsChange Config.VoiceCallChannelOffset to a range nothing else uses
Camera shows screenshot_basic_missingStart screenshot-basic
Camera shows upload_not_configuredSet np_phone:fivemanage_token, or pick another provider
Images are rejected (invalid_url)The host isn't in Config.Media.allowedHosts

np_* FiveM resources