Skip to content

Repository files navigation

sd-phone (THIS IS A BETA RELEASE, WILL HAVE ISSUES)

An iOS-themed smartphone for FiveM. that supports QBOX, QBCORE and ESX. 45+ server-backed apps, real app accounts, a live game-view camera and online multiplayer games. Ships its own custom phone props: eight phone items in eight colours, each tinting both the on-screen frame and the custom prop model held in hand. A unique phone system as well as sim cards can be enabled!

A drop-in lb-phone replacement. Scripts and custom apps written against lb-phone's exports and events keep running unmodified, and a first-boot migration carries your players across rather than resetting them: phone numbers and lock passcodes, contacts, blocked numbers, call history, SMS threads including groups and reactions, photos and albums, notes, phone settings, mail accounts with their inboxes, wallet transaction history, voice memos, Photogram and Birdy accounts with their posts, stories, DMs and followers, and the app logins themselves, so players open the phone already signed in.

If sd-phone is useful to you, please ⭐ the repo. Issues and pull requests are always welcome.

Live demo

Release Downloads Stars Discord Documentation

Framework Voice Compatibility

Live demo · Documentation · Store · Discord


Important

Coming from lb-phone? Give the first boot time to finish. sd-phone imports your lb-phone data on its first-ever startup. On a large database that is not instant: a production import of 3.8 million rows took roughly 8 minutes, and the server stays busy until it completes. The console prints the row count, a time estimate and per-domain progress, so you can tell it is working rather than hung. Let it run to the end.

This only happens once. Every later restart skips the domains that are already imported, so normal startups are unaffected.

Tip

Want a tablet? Check out the companion tablet, sd-tablet. A second device for the same character, running these same apps on a bigger screen. Same messages, same contacts, same accounts, same wallet, because there is one set of player data and both devices read it. No pairing, no sync, no second phone to configure.

It is a companion resource and needs sd-phone to run. More below.

Preview

image bb6 THIS mb3

Powered by Fivemanage

Fivemanage

sd-phone is partnered with Fivemanage for media hosting

The Camera, Photos and Voice Memos apps need somewhere to store what they capture. sd-phone uses Fivemanage for that: every screenshot, camera video and voice recording uploads to Fivemanage and comes back as a fast CDN URL, so you never run your own media server. It is the CDN and logging platform trusted by thousands of FiveM servers.

A free Fivemanage Media API token is required for photo, video and voice-note uploads to work. In the Fivemanage dashboard open the Tokens tab, create a token of type Media, and paste it into configs/server/apikeys.lua under FivemanageMedia. Without a key the camera and recorders still open, but nothing uploads or saves.

Get started with Fivemanage

The free tier is plenty for most servers.

Apps

Communication Phone (1:1, group and company calls over pma-voice), Messages (SMS, group threads, GIFs, money and location cards), Mail (multi-account, global inboxes), Groups, Dark Chat, Radio, Find Friends
Social Photogram (posts, stories, DMs, real live video streaming), Birdy, Cherry, Vibez, Streaks, all on a shared accounts engine with registration, sign-in, and password resets delivered in-game
Camera & media Camera (live game view: photos, video with voice capture, selfie mode), Photos, Music (with AirShare library sharing), Voice Memos
World Maps (CDN-streamed tiles, routing, pins), Garages, Homes, Wallet, Services (company directory, dispatch messaging, phone multijob), Ryde (player-to-player ride hailing), Weazel News, Pages, Marketplace, Review, Weather, Stocks
Games Chess, Connect Four, Battleship and Wordle with online lobbies, plus Blackjack, Cookie, Flappy, Blocks, Climber and Rail Runner with server-side leaderboards
Utilities Clock (alarms), Calendar, Notes (with sketches), Calculator, Compass, Health, Passwords, App Store, Settings

Home screen widgets

Eleven widgets, each in three sizes (2x2, 4x2 and 4x4), added from the Add Widget sheet in edit mode and placed anywhere on any page.

Widget Shows
Weather Current conditions coloured by the in-game sky, hourly strip, and a five-day forecast with temperature range bars
Clock Analogue face with a sweep hand and date
Clock (Digital) Large type, city, seconds and full date
Now Playing Artwork, track and transport controls that work without opening Music
Wallet Balance, cash on hand and recent transactions
Stocks Your holdings first by position value, with profit or loss, sparklines and a portfolio total
Contacts Hand-picked people you tap to call, chosen with the standard contact picker
Garage Your vehicles with photos, plates and stored / out / impounded status
Activity Steps, distance and heart rate as concentric rings
Weazel News The lead story with its photo, plus the breaking ticker
Timers & Alarms A live countdown ring, or the next alarm and everything else you have set

Nine of them offer a Dark, Light or Glass finish; Glass frosts your wallpaper behind the tile. Weather and Now Playing take their colour from their content instead. Clock and Weather also align left, centre or right. Previews in the picker render over your own wallpaper at true size, so what you see is what gets placed.

Companion: sd-tablet

sd-tablet is a tablet for the same character

sd-tablet

A second device your players can carry, running this phone's apps on a bigger screen. It is a companion resource, not a separate phone: it ships no apps, no database tables and no server logic of its own, and it renders sd-phone's own web/src against a tablet device profile, so there is exactly one copy of the interface and it cannot drift.

Everything is shared because nothing is copied. One set of player data on this server, two devices reading it: the same Messages threads, contacts, mail, notes, photos, app logins, wallet, settings and passcode. There is no pairing step and no sync, because there is nothing to sync.

The tablet cannot place or answer voice calls. That refusal is enforced here, in client/companion.lua, on sd-phone's side of the seam, so it holds even for a modified tablet build. Home screen arrangement is the one thing the two devices keep separately, since a layout's page boundaries are that device's own grid.

Requires sd-phone, and only works alongside it. Install it next to this resource and ensure it after: github.com/Samuels-Development/sd-tablet

Highlights

  • Real accounts engine. Social apps use actual registration and login, with verification codes and password resets delivered by in-game mail or SMS. Accounts are global, not per-character-slot.
  • Live game-view camera. The Camera app renders the world into the phone screen in real time; video clips record your microphone and nearby players' voices.
  • Photogram Live. Stream real encoded video to other players' phones, with clean late-joins.
  • Deep world integration. Garages and Homes bridge across ten-plus garage and housing systems; Wallet reads your framework bank; Services maps jobs to callable, messageable companies; Weather mirrors the in-game sky.
  • Custom apps. Other resources can put their own apps on the phone: one export call turns any webpage into an installable app with icons, badges, notifications, popups and an App Store listing. Custom apps built for lb-phone run unmodified. Start from the app templates (plain JS, React JS/TS, Vue 3, Svelte 5) and the custom app guide.
  • lb-phone drop-in compatibility. Third-party scripts written against lb-phone's exports and events keep working unmodified, and a one-command migrator imports lb-phone player data. See the compatibility docs.

For developers

The phone ships a full integration surface, documented at docs.samueldev.shop:

  • Server exports for sending mail, messages and notifications, starting calls, managing contacts, resolving numbers to players, logging transactions, posting news, and more.
  • Client exports for opening the phone, deep-linking into apps, and gating phone use.
  • Custom apps for shipping your own apps on the phone, with ready-made templates for plain JS, React, Vue and Svelte. Apps written for lb-phone register and run unmodified.
  • First-party events on every lifecycle moment: messages, mail, calls, transactions, posts, contacts.
  • lb-phone compatibility covering exports, events, and dependency 'lb-phone' lines.
-- A taste: text a player from a job script
exports['sd-phone']:sendSystemMessage('555-0199', 'LS Dispatch', targetNumber, 'New tow request at Legion Square.')

-- React to any SMS being sent
AddEventHandler('sd-phone:server:messages:sent', function(m)
    print(('%s texted %s'):format(m.senderNumber, m.targetNumber))
end)

Compatibility

Layer Supported
Frameworks QBCore, QBox, ESX (auto-detected)
Inventories ox_inventory, tgiann-inventory, qb-inventory, qs-inventory(-pro), origen_inventory, codem-inventory, jaksam_inventory, lj-inventory, ps-inventory
Voice pma-voice
Housing 9 housing systems for the Homes app
Garages 10 garage systems for the Garages app
Notify ox_lib (default), lation_ui (opt-in), framework-native fallback

Installation

Important

Grab the packaged sd-phone-*.zip from the latest release. The green Code → Download ZIP button gives you source only, with no web/build/, and the phone will open blank.

Prefer the full walkthrough? docs.samueldev.shop/resources/phone/installation

Dependencies

Resource What it is for
ox_lib Shared library
oxmysql Database access
sd-phone-props Streams the in-hand phone models

1. Start the resources

Extract sd-phone and sd-phone-props into your resources folder, then start them after their dependencies:

ensure ox_lib
ensure oxmysql
ensure sd-phone-props
ensure sd-phone

Database tables create themselves on first boot.

2. Add the phone items

One item per frame colour:

phone_black   phone_blue     phone_green   phone_orange
phone_pink    phone_purple   phone_red     phone_yellow

Ready-made ox_inventory definitions live in the installation docs, and the item icons ship in this repo's images/ folder.

Players can also open the phone with a keybind (F1 by default), which still requires owning one of these items.

Running unique phones with physical SIM trays (SimTray in configs/uniqueandsim.lua, ox_inventory only)? Give every phone item a buttons entry so players can open its tray:

buttons = {
    { label = 'SIM Tray', action = function(slot) exports['sd-phone']:openSimTray(slot) end },
},

Using the phone item opens the phone itself, so the tray needs its own button. Skip this in metadata mode, where SIMs are installed by using the sim_card item.

3. Add your API keys

In configs/server/apikeys.lua:

Key Needed for
FivemanageMedia Required. Camera, Photos and Voice Memos uploads. Create a free Fivemanage token of type Media. Without it those apps open, but nothing uploads or saves.
Giphy Optional. The GIF picker in Messages. Free key from developers.giphy.com.

Building from source

Cloned the repo instead of using a release? Build the UI yourself:

cd web
npm ci
npm run build

The output lands in the gitignored web/build/, and the server logs a clear error on boot if it is missing.

About

An extensive phone resource for FiveM that seeks to break the monopoly of phone scripts on FiveM.

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages