Device with SIM
Number, contacts and photos live on the device; the SIM carries the line.
coe_phoneCOE OS Smartphone
Phone, contacts, messages, camera, gallery, wallet and store apps
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.
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.
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.
Number, contacts and photos live on the device; the SIM carries the line.
coe_banking cards on the phone, confirmed by face or passcode.
Photos stored on the device and used by apps (Insta, Studio).
Automatically imports coe_mobile data without duplicates.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
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.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
IsPlayerAceAllowed(src, "coe.admin")
exports.coe_audit:Record(severity, category, event, context)
Clean Architecture & HAL
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.
| Parameter | Type |
|---|---|
playerId | any |
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.
| Parameter | Type |
|---|---|
playerId | any |
local result = exports['coe_phone']:ActiveLine(playerId)exports['coe_phone']:ConsumePayment(playerId, token, amount)
→ any
Export server ConsumePayment (server/main.lua).
| Parameter | Type |
|---|---|
playerId | any |
token | any |
amount | any |
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.
| Parameter | Type |
|---|---|
characterId | any |
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).
| Parameter | Type |
|---|---|
request | any |
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.
| Parameter | Type |
|---|---|
playerId | any |
payment | any |
amount | any |
description | any |
local result = exports['coe_phone']:ShopCharge(playerId, payment, amount, description)exports['coe_phone']:ShopOptions()
→ any
Export server ShopOptions (server/main.lua).
No parameters.
local result = exports['coe_phone']:ShopOptions()exports['coe_phone']:ShopRefund(_, ref, amount, description)
→ any
Export server ShopRefund (server/main.lua).
| Parameter | Type |
|---|---|
_ | any |
ref | any |
amount | any |
description | any |
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.
local result = exports['coe_phone']:UpgradeStatus()[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).