Installation ​
Requirements ​
| Resource | |
|---|---|
| Required | oxmysql |
| Required | np_prophandler (the phone in the hand, a synced attachment). Start it before np_phone |
| Required (one) | qbx_core, qb-core or es_extended (ESX Legacy) |
| Optional voice | pma-voice, saltychat or yaca-voice. Without one, calls are UI-only |
| Optional | ox_inventory (phone item, gated apps) |
| Optional | screenshot-basic (camera) |
| Optional | np_admin (permissions, settings, moderation log, staff tools) |
Node 18+ to build the NUI once.
Steps ​
- Put the resource in your
resourcesfolder asnp_phone. - Build the NUI:sh
cd web && npm ci && npm run build - Start it after its dependencies:cfg
ensure oxmysql ensure np_prophandler 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_admin # optional: permissions, settings, logs, staff tools ensure np_phone - Database: the tables are created automatically on first start (
CREATE TABLE IF NOT EXISTS, all prefixedphone_). Thesql/*.sqlfiles are reference copies only. - Phone item (only with
Config.RequireItem = true): add aphoneitem to your inventory, in ox_inventorydata/items.lua, qbshared/items.lua, or the ESXitemstable. - Camera: start
screenshot-basicand set an upload key (see below). - Darkchat needs a
vpnitem (Config.StoreApps). - Phone prop and privacy glass (optional): keep
stream/and theDLC_ITYP_REQUESTline infxmanifest.luafor the customnp_phone_handsetprop (without them np_phone falls back toprop_npc_phone_02and the screen mirror is off). Add aprivacy_glassitem if you want players to hide their screen with one (item definitions). Turn the mirror off withset np_phone:screen_mirror false. - Admins (optional): grant the node
np_phone.adminto your staff group in np_admin so they can delete other players' Chirps and ads and hand out the Chirp blue check (/chirpverify <handle> [on|off], see Chirp verification). No ACE lines are needed; see Permissions.
Permissions ​
np_phone uses no ACE. Its node is managed in np_admin (grant it to a group or a single
player; wildcards like np_phone.* work):
| Node | Grants |
|---|---|
np_phone.admin |
Delete other players' Chirps and Yellow Pages ads, see the real author of anonymous #tips, publish and delete news without a news job, /chirpverify, the staff tools |
Without np_admin running, admins are:
- the server console;
- identifiers in the convar
np_admin_fallback, e.g.set np_admin_fallback "license:abc…,discord:123…"; - on ESX, the groups in
np_admin_fallback_groups(defaultadmin,superadmin).
Logs: staff moderation (deleting another player's Chirp or ad, /chirpverify) is written to np_admin's
audit log, category np_phone.
Staff tools (np_admin → Resource tools, see Staff tools), both need np_phone.admin:
| Action | Label | Target | What |
|---|---|---|---|
np_phone.chirpverify |
Chirp verification | – | Handle + on / off: gives or removes the blue check (runs the verify command, so it does nothing when chirp.verifyCommand = false) |
np_phone.number |
Phone number | Player | Shows the phone number of the player's character |
Secrets in server.cfg ​
Never write secrets into the config files. Use set, not setr, so they aren't sent to clients:
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 ​
| Symptom | Fix |
|---|---|
| Blank phone | web/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 audio | No voice bridge loaded. Start the voice resource before np_phone, or check Config.Voice |
| pma-voice calls cross with other scripts' calls | Change Config.VoiceCallChannelOffset to a range nothing else uses |
Camera shows screenshot_basic_missing |
Start screenshot-basic |
Camera shows upload_not_configured |
Set np_phone:fivemanage_token, or pick another provider |
Images are rejected (invalid_url) |
The host isn't in Config.Media.allowedHosts |
| Others see the vanilla phone and no screen | np_phone_handset isn't streamed: check stream/ and the DLC_ITYP_REQUEST line (Phone prop) |
| The mirrored screen is invisible, mirrored or upside down | Adjust Config.Prop.screen (right sign) or Config.ScreenMirror.flipWinding (Phone prop) |
| Privacy glass has no effect | The item name differs from Config.ScreenMirror.glass.item, or the check is cached for glass.cacheMs (5 s) |
| Admins can't delete other players' Chirps or ads | The node np_phone.admin is missing. Grant it in np_admin, or without np_admin add the identifier to np_admin_fallback (Permissions) |