Skip to content

Installation

Dependencies

Hard requirements, both must start before the phone:

ResourcePurpose
ox_librequire loader, callbacks, notifications
oxmysqldatabase access
sd-phone-propsstreams the in-hand phone models, one per frame colour

The phone auto-detects the running framework (qb-core, qbx_core, ESX) and whichever inventory, banking, housing, garage, and voice resources are installed; there is nothing to configure for the common setups. Calls and the Radio app carry audio over pma-voice.

Setup

  1. Place sd-phone and sd-phone-props in your resources folder and ensure them after the dependencies:
cfg
ensure ox_lib
ensure oxmysql
ensure sd-phone-props
ensure sd-phone
  1. Database tables create themselves on first boot; there is no SQL file to import.

  2. Copy the item icons from sd-phone's images/ folder into ox_inventory/web/images/. The files are named after the items (phone.png, phone_blue.png, ...), so ox_inventory picks them up automatically with no image field needed.

  3. Add the phone items to ox_inventory/data/items.lua. Each item maps to a frame colour and matching in-hand prop, and consume = 0 keeps the item on use:

lua
['phone'] = {
    label = 'Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone' }
},

['phone_blue'] = {
    label = 'Blue Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_blue' }
},

['phone_green'] = {
    label = 'Green Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_green' }
},

['phone_orange'] = {
    label = 'Orange Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_orange' }
},

['phone_pink'] = {
    label = 'Pink Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_pink' }
},

['phone_purple'] = {
    label = 'Purple Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_purple' }
},

['phone_red'] = {
    label = 'Red Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_red' }
},

['phone_yellow'] = {
    label = 'Yellow Phone',
    weight = 190,
    stack = false,
    consume = 0,
    server = { export = 'sd-phone.usePhone_yellow' }
},

INFO

The black phone's item name is phone, not phone_black, and its icon is phone.png. The item-to-colour mapping lives in configs/phone.lua if you want different item names. Players can also press the open keybind (default F1), which is server-gated on actually owning a phone item. Other inventories register through their own usable-item APIs automatically; only the icons need copying into your inventory's image folder.

API keys

Third-party keys live in configs/server/apikeys.lua, which is deliberately excluded from the client download:

KeyPurpose
GiphyThe Messages GIF picker. Free key from developers.giphy.com; left blank the picker shows a setup hint
FivemanageMediaPhoto, video, and voice-note uploads via fivemanage.com. Left blank, the uploader falls back to the legacy sd_fivemanage_key convar

Convars

ConvarDefaultPurpose
sd_fivemanage_keyemptyLegacy location for the Fivemanage media token; prefer configs/server/apikeys.lua
sd_phone_lbcompattrueThe lb-phone compatibility layer; set false to disable
sd_phone_turn_url / sd_phone_turn_username / sd_phone_turn_credentialemptyStatic TURN server for nearby-voice capture in camera videos and Photogram Live
sd_cf_turn_token_id / sd_cf_turn_api_tokenemptyAlternatively, Cloudflare Calls TURN credentials (auto-minted short-lived keys)

The TURN convars are optional: without them, video voice capture still records the player's own microphone, and nearby-player voices are captured whenever a direct connection succeeds.

Migrating from lb-phone

If the server previously ran lb-phone, the built-in importer carries player data over (numbers, passcodes, contacts, call history, blocked numbers, SMS including groups, photos, notes):

sdphone:migrate dry   # preview, writes nothing
sdphone:migrate       # import, idempotent and marker-guarded

Third-party lb-phone integrations keep working through the compatibility layer without edits.