T3 // COE OS & Communication

coe_phone

COE OS Smartphone

Phone, contacts, messages, camera, gallery, wallet and store apps

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_inventorycoe_loggingcoe_notifycoe_ui
coe_phone 9 exports · 2 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

The COE OS smartphone. Opens with F1, /celular or by using the Phone item, and bundles voice calls, contacts, messages with offline delivery, a camera and gallery stored on the device, a Wallet holding bank cards to pay without the physical card, and the apps installed from the store (coe_apps). Replaces the basic phone (coe_mobile): coe_supervisor holds the basic one back and, on every start, the upgrade imports number, contacts, conversations, calls and settings from the basic phone.

On FiveM Enhanced

The number lives on the device SIM (an item), not on the character: losing, lending or swapping a phone has real roleplay consequences, and call audio is routed through coe_talk.

02 // FEATURES

What the module delivers

01

Device with SIM

Number, contacts and photos live on the device; the SIM carries the line.

02

Wallet

coe_banking cards on the phone, confirmed by face or passcode.

03

Camera & Gallery

Photos stored on the device and used by apps (Insta, Studio).

04

Lossless Upgrade

Automatically imports coe_mobile data without duplicates.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Presentation & NUI
HTML5 · CSS tokens · CoE UI
CEF DX12
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // PRESENTATION & NUI

Responsive NUI & CoE UI Design System

Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.

Five themes supported in real time through CSS variables (--coe-accent, --coe-surface)
Fully keyboard-navigable (Tab, Esc, Enter) and ARIA-accessible
Secure asynchronous communication with the FiveM client via fetch("https://...")
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 9

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_phone']:ActiveDevice(playerId) → any

Returns the device the player is using ({ serial }), or nil plus an error. Apps that bind a session to a device (such as email) use its serial number: anyone who picks up the unlocked device also gets its sessions.

ParameterType
playerIdany
LUA
local result = exports['coe_phone']:ActiveDevice(playerId)
exports['coe_phone']:ActiveLine(playerId) → any

Returns the SIM line (slot 1) on the phone the player is using ({ number, display, holder }), or nil plus an error.

ParameterType
playerIdany
LUA
local result = exports['coe_phone']:ActiveLine(playerId)
exports['coe_phone']:ConsumePayment(playerId, token, amount) → any

Export server ConsumePayment (server/main.lua).

ParameterType
playerIdany
tokenany
amountany
LUA
local result = exports['coe_phone']:ConsumePayment(playerId, token, amount)
exports['coe_phone']:NumberOf(characterId) → any

Returns the formatted number for the first SIM owned by the character, or nil if they have none.

ParameterType
characterIdany
LUA
local result = exports['coe_phone']:NumberOf(characterId)
exports['coe_phone']:RequestPayment(request) → any

In-person wallet payment (for example, at a coe_shops counter): opens the phone if needed, shows the amount for approval, and returns authorization. The requesting resource passes the token to its server, which consumes it with ConsumePayment (only callers in Wallet.PaymentCallers). Blocks the caller's thread until the player decides. request: { amount, label, note }. Returns { token, cardId } or { error } (cancelled, phone_unavailable, invalid_amount).

ParameterType
requestany
LUA
local result = exports['coe_phone']:RequestPayment(request)
exports['coe_phone']:ShopCharge(playerId, payment, amount, description) → any

Phone wallet payments at stores (coe_shops:RegisterPaymentMethod, method wallet): the store client calls this resource's RequestPayment export and sends the token; the charge consumes the token and is posted to the selected card's credit.

ParameterType
playerIdany
paymentany
amountany
descriptionany
LUA
local result = exports['coe_phone']:ShopCharge(playerId, payment, amount, description)
exports['coe_phone']:ShopOptions() → any

Export server ShopOptions (server/main.lua).

No parameters.

LUA
local result = exports['coe_phone']:ShopOptions()
exports['coe_phone']:ShopRefund(_, ref, amount, description) → any

Export server ShopRefund (server/main.lua).

ParameterType
_any
refany
amountany
descriptionany
LUA
local result = exports['coe_phone']:ShopRefund(_, ref, amount, description)
exports['coe_phone']:UpgradeStatus() → any

Returns a report for the latest basic-phone upgrade (the coe_supervisor displays it with the coe_upgrades command).

No parameters.

LUA
local result = exports['coe_phone']:UpgradeStatus()
04 // COMMANDS

In-game commands 2

[F1]

Abrir smartphone (COE OS) · +coe_phone_open · rebindable in FiveM key bindings

/celular

Opens or closes the smartphone (default key: F1; requires the Phone item).