Commercial Property Deeds
Physical brick-and-mortar storefronts on the map with passive income and stock management.
coe_businessesEnterprise & Corporation Management
Player Enterprise Ownership with Automated Payroll and Corporate Vaults
Empowers players to purchase and operate gas stations, 24/7 retail convenience stores, mechanic shops, and car dealerships. Features a complete corporate management dashboard to hire employees, configure commissions, purchase wholesale supply stock, and track local taxes.
Secure transactions processed via coe_audit and coe_database with immediate persistence and zero ledger discrepancies.
Physical brick-and-mortar storefronts on the map with passive income and stock management.
Configure wages, custom employee access levels, and sales commissions.
Stores corporate revenues with withdrawal authority restricted to business partners.
Detailed profit/loss statements with automated municipal tax calculations.
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_businesses']:IsReady()
→ boolean
Returns whether the business registry is fully initialized.
No parameters.
local result = exports['coe_businesses']:IsReady()exports['coe_businesses']:Categories()
→ table
Business category definitions from `BusinessesConfig.Categories`.
No parameters.
local result = exports['coe_businesses']:Categories()exports['coe_businesses']:RuleSchema()
→ table
Configurable business rule schemas (`BusinessesConfig.Rules`).
No parameters.
local result = exports['coe_businesses']:RuleSchema()exports['coe_businesses']:List(category)
→ table[]
List of registered businesses (optionally filtered by category). Empty before `IsReady`.
| Parameter | Type |
|---|---|
category | string|nil |
local result = exports['coe_businesses']:List(category)exports['coe_businesses']:Get(id)
→ table|nil
Retrieves business data by unique business ID.
| Parameter | Type |
|---|---|
id | string |
local result = exports['coe_businesses']:Get(id)exports['coe_businesses']:Save(raw, by)
→ table|CoeBusinessesError
Creates or updates a business (zones, duty stations, owner, staff, grades). Requires `coe.businesses.write`.
| Parameter | Type |
|---|---|
raw | table |
by | string|integer|nil |
local result = exports['coe_businesses']:Save(raw, by)exports['coe_businesses']:Seed(raw)
→ table|CoeBusinessesError
Creates business only if it does not already exist (package seed, e.g. coe_shops). Requires `coe.businesses.write`.
| Parameter | Type |
|---|---|
raw | table |
local result = exports['coe_businesses']:Seed(raw)exports['coe_businesses']:Delete(id, by)
→ true|CoeBusinessesError
Deletes a business registry entry. Requires `coe.businesses.write`.
| Parameter | Type |
|---|---|
id | string |
by | string|integer|nil |
local result = exports['coe_businesses']:Delete(id, by)exports['coe_businesses']:ClockIn(source, characterId, businessId, at, atStation)
→ true|CoeBusinessesError
Clocks a character into active duty. Requires `coe.businesses.write`.
| Parameter | Type |
|---|---|
source | integer |
characterId | string|integer |
businessId | string |
at | vector3|table|nil |
atStation | boolean|nil |
local result = exports['coe_businesses']:ClockIn(source, characterId, businessId, at, atStation)exports['coe_businesses']:ClockOut(source, reason)
→ true|CoeBusinessesError
Clocks out a character. Requires `coe.businesses.write` or `coe.businesses.clock`.
| Parameter | Type |
|---|---|
source | integer |
reason | string|nil |
local result = exports['coe_businesses']:ClockOut(source, reason)exports['coe_businesses']:Clock(source, businessId, stationId)
→ {
Full clock in/out flow at a duty station (validation, notifications, audit). Requires `coe.businesses.clock`.
| Parameter | Type |
|---|---|
source | integer |
businessId | string |
stationId | string |
local result = exports['coe_businesses']:Clock(source, businessId, stationId)exports['coe_businesses']:IsOnDuty(businessId, characterId)
→ boolean
Returns whether character is currently on duty for the business.
| Parameter | Type |
|---|---|
businessId | string |
characterId | string|integer |
local result = exports['coe_businesses']:IsOnDuty(businessId, characterId)exports['coe_businesses']:DutySummary()
→ {
Returns total and per-business active duty headcounts. Requires `coe.businesses.admin`.
No parameters.
local result = exports['coe_businesses']:DutySummary()exports['coe_businesses']:CurrentDuty(source)
→ string|nil
Returns the business ID where the player is currently clocked in.
| Parameter | Type |
|---|---|
source | integer |
local result = exports['coe_businesses']:CurrentDuty(source)exports['coe_businesses']:Access(businessId, characterId)
→ CoeBusinessAccess
Resolves permissions and role capabilities for a character within a business.
| Parameter | Type |
|---|---|
businessId | string |
characterId | string|integer |
local result = exports['coe_businesses']:Access(businessId, characterId)exports['coe_businesses']:Partners(businessId)
→ {
Lists registered partners of a business.
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_businesses']:Partners(businessId)exports['coe_businesses']:Debtors(businessId)
→ (string|integer)[]
List of liability contacts: business owner first, then partners. Empty if no owner.
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_businesses']:Debtors(businessId)exports['coe_businesses']:Permissions()
→ table<string,
Dictionary of known role permissions (`name = label`), including third-party registrations.
No parameters.
local ok, detail = exports['coe_businesses']:Permissions()exports['coe_businesses']:RegisterPermissions(list)
→ true|CoeBusinessesError
Registers custom grade permissions from a package. Prefix defaults to resource name without `coe_` (e.g. `police.arrest`). Requires `coe.businesses.permissions`.
| Parameter | Type |
|---|---|
list | { |
local result = exports['coe_businesses']:RegisterPermissions(list)exports['coe_businesses']:Grades(businessId)
→ table[]
List of configured job grades for the business.
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_businesses']:Grades(businessId)exports['coe_businesses']:GradeOf(businessId, characterId)
→ table|nil
Returns the grade assigned to a character in this business.
| Parameter | Type |
|---|---|
businessId | string |
characterId | string|integer |
local result = exports['coe_businesses']:GradeOf(businessId, characterId)exports['coe_businesses']:Can(businessId, characterId, permission, remoteOnly)
→ boolean
Checks if a character is authorized for a specific permission. Owners have all; staff have grade permissions (while on duty, unless remote access).
| Parameter | Type |
|---|---|
businessId | string |
characterId | string|integer |
permission | string |
remoteOnly | boolean|nil |
local result = exports['coe_businesses']:Can(businessId, characterId, permission, remoteOnly)exports['coe_businesses']:Salary(businessId, characterId)
→ integer
Returns the salary rate for the character's grade. Requires `coe.businesses.payroll` (otherwise returns 0).
| Parameter | Type |
|---|---|
businessId | string |
characterId | string|integer |
local result = exports['coe_businesses']:Salary(businessId, characterId)exports['coe_businesses']:Payroll(businessId)
→ {
Retrieves full payroll schedule for business staff. Requires `coe.businesses.payroll` (otherwise empty list).
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_businesses']:Payroll(businessId)exports['coe_businesses']:RegisterTab(def)
→ true|CoeBusinessesError
Registers an extension tab on the business tablet application. Requires `coe.businesses.extend`. Unregisters on caller stop.
| Parameter | Type |
|---|---|
def | table |
local result = exports['coe_businesses']:RegisterTab(def)exports['coe_businesses']:RegisterProvider(kind, def)
→ true|CoeBusinessesError
Registers a data provider for Fleet (`fleet`: `{ list, setStaff? }`) and Property (`properties`: `{ list }`) tabs. Requires `coe.businesses.extend`.
| Parameter | Type |
|---|---|
kind | 'fleet'|'properties' |
def | table |
local result = exports['coe_businesses']:RegisterProvider(kind, def)exports['coe_businesses']:TabletInstances(playerId)
→ table[]
Lists business apps accessible to player on tablet (one per owned or employed business). Requires `coe.businesses.tablet`.
| Parameter | Type |
|---|---|
playerId | integer |
local result = exports['coe_businesses']:TabletInstances(playerId)exports['coe_businesses']:TabletCall(playerId, appId, action, payload, instance)
→ table
Handles business tablet app actions. `instance` specifies business context (never trusted from payload). Requires `coe.businesses.tablet`.
| Parameter | Type |
|---|---|
playerId | integer |
appId | 'business' |
action | string |
payload | table|nil |
instance | string |
local result = exports['coe_businesses']:TabletCall(playerId, appId, action, payload, instance)/ponto
Clocks in or out at the nearest duty station.