ZX MDT Documentation
ZX MDT · v3.1.8

ZX MDT documentation.

A quick guide to installing, configuring and integrating ZX MDT on a QBox FiveM server.

Quick start Installing for the first time?

Install the three core dependencies, configure the resource, then ensure ZX MDT after your selected integrations.

View installation →

Requirements

ZX MDT is built for QBox / qbx_core and requires the following resources.

  • qbx_core
  • ox_lib
  • oxmysql
Optional dependencies

Your selected garage, housing, phone, licence and inventory integrations must also be installed and started before ZX MDT. Profile-photo capture additionally uses screenshot-basic and FiveManage when enabled.

Installation

  1. 1
    Upload the resource

    Place the folder in your resources directory and keep the resource name as zx-mdt.

  2. 2
    Configure ZX MDT

    Edit the files inside the config/ folder for your jobs, permissions and integrations.

  3. 3
    Set up SQL

    Leave Config.AutoInsertSQL = true for automatic setup, or disable it and manually import zx-mdt.sql.

  4. 4
    Start the resource

    Ensure dependencies and selected integrations before zx-mdt.

server.cfg
ensure oxmysql
ensure ox_lib
ensure qbx_core

# Start your selected integrations here
# ensure ox_inventory
# ensure jg-advancedgarages

ensure zx-mdt
Default access

The MDT opens with /mdt or the default F6 keybind. Both can be changed or disabled in the config.

Configuration

The main settings are split across the config/ folder so you can update the resource without editing the MDT core.

config/main.lua
Config.AutoInsertSQL = true

Config.AllowedJobs = {
    ['police'] = true,
    ['sheriff'] = true,
    ['sasp'] = true,
}

Config.Command = 'mdt'
Config.CommandOpen = true
Config.Keybind = 'F6'
Config.KeybindOpen = true

Config.Item = false
Config.ItemName = 'police_mdt'
Config.Locale = 'en'
PERMISSIONSRank based access

Use config/permissions.lua to control who can create, edit, delete or manage sensitive MDT records.

NAVIGATIONHide unused modules

Use config/navigation.lua to hide pages your server does not use.

Integrations

Select the resources your server actually uses in config/integrations.lua.

config/integrations.lua
Config.Garage = 'jg-advancedgarages'
Config.Housing = 'qbx-properties'
Config.Licenses = 'qbx'
Config.Phone = 'nx-phone'
Config.Inventory = 'ox_inventory'
GARAGESSupported

qbx-garages, jg-advancedgarages, quasar-advancedgarages, custom or none.

HOUSINGSupported

qbx-properties, quasar-housing, custom or none.

PHONESSupported

nx-phone, qb-phone, qs-smartphone, lb-phone, custom or none.

INVENTORYSupported

ox_inventory, qb-inventory, qs-inventory or custom.

Client exports

Use these from another client-side resource.

client.lua
exports['zx-mdt']:open()
exports['zx-mdt']:close()
local opened = exports['zx-mdt']:isOpened()

Server exports

The current build exposes the following server-side exports.

server exports
GetOwnedVehicles(citizenId)
GetOwnedProperties(citizenId)
GetHouses(query)
GetHouseData(id)
LookupVehicle(plate)
GetCitizenLicenses(citizenId)
GetCitizenPhoneNumber(citizenId)
GetRegisteredProviders()
GetGarageIntegration()
GetHousingIntegration()
GetLicenseIntegration()
GetPhoneIntegration()
GetInventoryIntegration()
IsReady()
GetVersion()
GetVehicleHistory(plate)
AddVehicleHistory(plate, action, details, officerName, incidentId)
GetVehicleFlags(plate)
GetActiveWarrants(citizenId)
GetCitizenFlags(citizenId)
GetCitizenProfile(citizenId)
AddIncidentActivity(incidentId, actionType, message, officerName)
RefreshMDTClients()

Example

server.lua
local profile = exports['zx-mdt']:GetCitizenProfile(citizenId)
local warrants = exports['zx-mdt']:GetActiveWarrants(citizenId)
local vehicle = exports['zx-mdt']:LookupVehicle(plate)

Events

These are the useful public events exposed by the resource.

client events
TriggerEvent('zx-mdt:client:open')
TriggerEvent('zx-mdt:client:close')
TriggerEvent('zx-mdt:client:refresh', payload)
server ready event
AddEventHandler('zx-mdt:server:ready', function()
    print('ZX MDT is ready')
end)

Before opening a ticket

If something is not working, include enough information for the issue to be reproduced quickly.

  • ZX MDT version
  • Your framework and selected integrations
  • Relevant client/server console errors
  • Steps to reproduce the problem
  • Your order number when requesting customer support
Start order matters

Make sure qbx_core, ox_lib, oxmysql and any selected integration resources start before ZX MDT.

ZX Phone Documentation
ZX PHONE · VERSION 0.3.0

ZX Phone documentation.

Installation, core configuration and the complete nx-phone Lua integration surface from the supplied build.

FrameworkQBCore + ox_inventory

ZX Phone ships as two resources: nx-phone-ui for the interface and nx-phone for gameplay/client/server logic.

Install ZX Phone →

Requirements

Install the core dependencies before starting ZX Phone. Some apps have extra optional integrations.

REQUIREDCore resources

qb-core, oxmysql, ox_inventory, lvs_interact, nx-phone-ui and nx-phone.

CALLSVoice

pma-voice is required for real phone call channels.

MEDIACamera uploads

fmsdk is recommended. screenshot-basic can be used as the fallback uploader.

OPTIONALFeature integrations

Examples include ash-banking, JG Advanced Garages, JG Vehicle Mileage, JG Dealerships and nx-transit.

Installation

Follow this order for a clean first install. Keep both resource folder names unchanged.

  1. 1
    Back up your database

    Always take a database backup before installing or upgrading a phone system.

  2. 2
    Upload both resources

    Place nx-phone-ui and nx-phone in your resources folder. Do not rename them: nx-phone loads its UI from cfx-nui-nx-phone-ui.

  3. 3
    Install the SQL

    Import nx-phone/ox_inventory_install/nx-phone.sql into the same MySQL database used by QBCore. The resource also contains startup migrations for existing installs.

  4. 4
    Add the ox_inventory items

    Merge the entries from ox_inventory_install/items_snippet.lua into ox_inventory/data/items.lua. Phone and SIM items must stay stack = false.

  5. 5
    Configure config.lua

    Set the opening key, phone models/items, SIM/container behaviour, enabled apps and any app-specific integrations you use.

  6. 6
    Configure camera uploads

    If using fmsdk, configure its FiveManage key. If using the fallback, place your FiveManage Media API key in server/api-keys.lua.

  7. 7
    Set the start order

    Start framework/database/inventory/voice dependencies and the UI before nx-phone. Start optional banking/JG resources before the phone when you enable those integrations.

  8. 8
    Test the first phone

    Give a player a configured phone item and a non-stackable sim_card, install the SIM into the phone container, then press the default M key. Restricted apps also require encrypted_vpn when configured.

server.cfg
ensure oxmysql
ensure qb-core
ensure ox_inventory
ensure lvs_interact
ensure pma-voice

# Start any integrations you use before the phone
# ensure ash-banking
# ensure jg-advancedgarages
# ensure jg-vehiclemileage
# ensure jg-dealerships
# ensure fmsdk

ensure nx-phone-ui
ensure nx-phone
Default controls

The phone keybind defaults to M through Config.OpenKey. The player must have a working physical phone and active SIM before it opens.

Included apps

The supplied build contains communication, service, work and underground apps. Use Config.Apps to enable or disable them globally.

COMMUNICATIONCore phone apps

Calls, Messages, Contacts, System Mail, Lemon List, Twitter/Twatter and Pinger.

PLAYER SERVICESEveryday apps

Details, Garage, Housing, Documents, Calendar, Calculator, Camera/Gallery and Settings.

WORKJob & business apps

Job Centre, Business, Guber, Transit, Towing and Delivery.

UNDERGROUNDEncrypted apps

Boosting, Chopshop, GhostDrop, VaultRoute and OxyRun can be gated behind the configured VPN module.

config.lua breakdown

All shared phone configuration lives in nx-phone/config.lua. The table below covers every top-level config section in this build.

Typical starting point

config.lua
Config.OpenKey = 'M'
Config.PhoneItem = 'phone'

Config.SimCards.Enabled = true
Config.PhoneContainer.Enabled = true

-- Disable an app globally
Config.Apps.transit = false

-- Choose home/dock positions
Config.AppSlots.Home[1] = 'details'
Config.AppSlots.Dock[1] = 'calls'
Config.OpenKeyOpenKey

Default keyboard key used to open/close the phone.

Config.PhoneItem / PhoneItemsPhoneItem, PhoneItems

Physical phone items, frame colours and per-handset premium features such as better camera, Dual SIM, profiles and signal boost.

Config.PhonePropDefaultModel, Bone, Position, Rotation, Colors

Handheld GTA phone model, bone, position/rotation and colour/model overrides.

Config.PhoneHardwareBetterCamera, DualSim, Profiles, Signal

Tuning for premium camera quality, maximum SIMs, Personal/Business profiles and signal behaviour.

Config.SimCardsEnabled, Item, NumberPrefix, NumberDigits, MetadataLabel

Unique SIM item, number generation and SIM metadata behaviour.

Config.PhoneContainerEnabled, Slots, MaxWeight, RequiredPhoneItem, AllowedItems, RequiredApps

ox_inventory phone-container slots, allowed modules and apps that require modules such as encrypted_vpn.

Config.Appscalls, messages, contacts, twitter, garage, business, boosting, towing, etc.

Global on/off switches for each phone app. Disabled apps are removed and blocked.

Config.AppSlotsHome, Dock

Controls exact Home and Dock slots. Home uses 20 slots per page; Dock supports 4.

Config.BusinessInvoicesEnabled, PaymentAccount, AllowedJobs, PaymentProvider, PayoutProvider, AshBanking

Business invoice limits, jobs, reasons, payment provider and business payout provider.

Config.BusinessManagerEnabled, ManagerGrade, AllowedJobs, Stock, BusinessStashes, StockCatalogues

Manager grades, permissions, stock ordering, stashes, catalogues and promotions.

Config.SettingsDefaultAvatar, DefaultSmsNotifications, DefaultEmailNotifications, DefaultSilentMode, DefaultVolume

Defaults for avatar, notification preferences, silent mode, volume, balance and embedded images.

Config.GuberEnabled, PaymentAccount, BaseFare, PricePerKm, DriverCommissionPercent, DriverJobs

Ride-share fares, commission, request timeout, driver restrictions and distance limits.

Config.OxyRunPackageItem, RewardItem, MinimumDrops, MaximumDrops, Vehicles, Pickups

Oxy parcel item/rewards, drops, pickup/handoff distances, buyer vehicles, models and locations.

Config.TransitEnabled, RefreshSeconds, Stations, Trains

Transit app enable state, refresh timing, stations and train/service definitions.

Config.SystemMailMaxMailsPerPlayer, MaxSenderLength, MaxSubjectLength, MaxMessageLength, DefaultSender

Persistent system-mail limits, cooldown and default sender/icon.

Config.TwitterVerificationPrice, BillingDays, PaymentAccount, MaxTweetLength, ModeratorAce, ModeratorJobs

Twatter verification subscription, posting limits, usernames, moderation and reporting.

Config.MediaMaxPhotosPerPlayer, CaptureQuality, UploadQuality, UseFivemanageSdk, ScreenshotResource

Camera/Gallery limits, WebP compression, nearby sharing and FiveManage upload provider settings.

Config.ContactsMaxContactsPerPlayer, MinPhoneDigits, MaxPhoneDigits, AllowNearbySharing, NearbyShareDistance

Contact limits, number validation, nearby sharing and directory caching.

Config.PingerAllowAnonymous, RequireReceiverPhone, CooldownMs, RequestTimeoutMs

Anonymous pings, phone requirement, cooldown and request timeout.

Config.LemonListCategories, MaxDescriptionLength, MaxActivePostsPerPlayer, AdvertLifetimeHours

Advert categories, post limits, cooldown, lifetime and notifications.

Config.DocumentsEditableTypes, AllowSharing, JGDealershipsResource, UseJGDealershipFinance, AllowFinancePayments

Editable document types, sharing, licence issuer and JG Dealership finance integration.

Config.GarageVehicleTable, AllowTracking, AllowTransfer, JGAdvancedGaragesResource, VehicleMileageResource

Vehicle table, tracking/transfer rules, JG Advanced Garages and JG Vehicle Mileage integrations.

Config.CalendarMaxEventsPerPlayer, MaxTitleLength, MaxAttendeesPerEvent, AllowInvites

Calendar limits and invitation rules.

Config.CallsRingTimeoutMs, HistoryLimit, RequireReceiverPhone, RespectMessageBlocks, EnableFakeCallPreview

pma-voice call timeout/history rules and optional fake-call UI preview.

Config.MessagesMaxMessageLength, MaxAttachments, RequireReceiverPhone, TypingTimeoutMs

Message length/attachments, phone-number limits, receiver requirements and typing timeout.

Config.CryptoPaymentAccount, PriceUpdateSecondsMin/Max, TradeSpreadPercent, fees, Assets

In-city crypto market pricing, liquidity/slippage, fees, limits and configured assets.

Config.JobCenterEnabled, AllowJobChange, MaxGroupMembers, InviteDistance, Jobs

Job Centre availability, grouping, invite rules and selectable job definitions.

Restart after config changes

For app enable/disable, phone hardware, SIM/container rules and most integration changes, restart nx-phone after editing config.lua.

Client exports

All client exports declared by the supplied nx-phone build. Call them from another client resource with exports['nx-phone']:.

exports['nx-phone']:GetCurrentCall()calls.lua

Returns the current client call state.

exports['nx-phone']:StartFakeCallPreview(mode, name)calls.lua

Starts the local fake-call preview used for UI testing.

exports['nx-phone']:EndFakeCallPreview()calls.lua

Stops the local fake-call preview.

exports['nx-phone']:HasSimCard()main.lua

Returns whether the player currently has a usable phone with an active SIM.

exports['nx-phone']:HasWorkingPhone()main.lua

Returns whether the player has a physical phone with a usable active SIM.

exports['nx-phone']:GetSimPhoneNumber()main.lua

Returns the active SIM phone number.

exports['nx-phone']:GetActiveSimId()main.lua

Returns the active SIM ID.

exports['nx-phone']:GetPhoneHardwareState()main.lua

Returns the current handset/SIM/features hardware state.

exports['nx-phone']:HasPhoneSignal()main.lua

Returns whether the active phone currently has service.

exports['nx-phone']:GetPhoneSignal()main.lua

Returns the current signal state and bar count.

exports['nx-phone']:OpenPhone()main.lua

Attempts to open the phone.

exports['nx-phone']:ClosePhone()main.lua

Closes the phone and releases NUI focus/phone state.

exports['nx-phone']:IsPhoneOpen()main.lua

Returns whether the phone is currently open.

exports['nx-phone']:IsCallMinimized()main.lua

Returns whether the current call is in the minimized phone state.

exports['nx-phone']:SetCallActive(active)main.lua

Sets the local call-active state.

exports['nx-phone']:SetCallRinging(active)main.lua

Sets the local ringing state.

exports['nx-phone']:NuiEvent(action, data)main.lua

Sends a named action/data payload to the ZX Phone NUI.

exports['nx-phone']:Notify(opts)main.lua

Shows a phone notification when the handset is usable and the category is enabled.

exports['nx-phone']:GetSettings()settings.lua

Returns the loaded phone settings for the current character.

exports['nx-phone']:GetAvatar()settings.lua

Returns the current phone/profile avatar.

exports['nx-phone']:IsSilentMode()settings.lua

Returns whether silent mode is enabled.

exports['nx-phone']:IsNotificationEnabled(category)settings.lua

Checks whether a notification category is enabled.

exports['nx-phone']:SendMail(mail)system-mail.lua

Creates system mail from the client through the phone mail flow.

exports['nx-phone']:SendSystemMail(mail)system-mail.lua

Alias of SendMail for system-mail integrations.

Server exports

All server exports declared by the supplied build. These cover phone/SIM state, business integrations, calls/messages, gallery, crypto, Job Centre and Transit.

exports['nx-phone']:HasBusinessPermission(citizenid, business, key, level, boss)business-manager.lua

Checks a citizen's Business Manager permission for a business.

exports['nx-phone']:GetBusinessPromotion(business, item, code)business-manager.lua

Returns the best matching active promotion for a business/item/code.

exports['nx-phone']:ApplyBusinessDiscount(business, item, subtotal, code, consume)business-manager.lua

Calculates an active business promotion and optionally consumes a use.

exports['nx-phone']:RecordBusinessSale(data)business-manager.lua

Records an external sale in the Business Manager history/analytics.

exports['nx-phone']:BuildCallsFor(simId)calls.lua

Builds call history/state for a SIM identity.

exports['nx-phone']:GetOnlinePlayerByPhone(phone)contacts.lua

Finds the online QBCore player for a phone number.

exports['nx-phone']:GetSavedContact(simId, phone)contacts.lua

Returns a saved contact for a SIM/citizen identity and number.

exports['nx-phone']:RefreshContactDirectory()contacts.lua

Forces the cached phone-number directory to refresh.

exports['nx-phone']:GetCryptoBalance(citizenid, assetId)crypto.lua

Returns a citizen's balance for a configured crypto asset.

exports['nx-phone']:AddCrypto(citizenid, assetId, amount, reference)crypto.lua

Credits crypto to a citizen and records the transaction.

exports['nx-phone']:RemoveCrypto(citizenid, assetId, amount, reference)crypto.lua

Debits crypto from a citizen and records the transaction.

exports['nx-phone']:SetCryptoPrice(assetId, price)crypto.lua

Overrides a configured crypto asset price and pushes a market refresh.

exports['nx-phone']:AddGalleryPhoto(targetSource, imageUrl, metadata)gallery.lua

Adds a hosted image to an online player's active SIM gallery.

exports['nx-phone']:GetJobCenterGroup(groupId)jobcenter.lua

Returns a Job Centre group by group ID.

exports['nx-phone']:GetPlayerJobCenterGroup(source)jobcenter.lua

Returns the Job Centre group for a player source.

exports['nx-phone']:GetJobCenterGroupMembers(identifier)jobcenter.lua

Returns server IDs for members of a Job Centre group.

exports['nx-phone']:SetJobCenterTasks(identifier, label, tasks, durationSeconds)jobcenter.lua

Assigns a task set to a Job Centre group/player-group identifier.

exports['nx-phone']:SetPlayerJobCenterTasks(source, label, tasks, durationSeconds)jobcenter.lua

Assigns a task set using a player source.

exports['nx-phone']:UpdateJobCenterTask(identifier, taskId, update)jobcenter.lua

Updates progress/data for one active group task.

exports['nx-phone']:CompleteJobCenterTask(identifier, taskId)jobcenter.lua

Marks one Job Centre task complete.

exports['nx-phone']:ClearJobCenterTasks(identifier)jobcenter.lua

Clears the active Job Centre task set.

exports['nx-phone']:HasPhoneItem(source, itemName)main.lua

Checks whether a player has a configured physical phone item.

exports['nx-phone']:HasWorkingPhone(source)main.lua

Checks whether a player has a usable phone and active SIM.

exports['nx-phone']:GetPhoneHardwareState(source)main.lua

Returns the player's handset, SIM, profile and feature state.

exports['nx-phone']:HasAppAccess(source, app)main.lua

Checks whether a player can access an app, including required phone modules.

exports['nx-phone']:GetRuntimeApps(source)main.lua

Returns the final enabled/disabled app map for a player.

exports['nx-phone']:PhoneContainsItem(source, itemName)main.lua

Checks the player's active/working phone container for an item.

exports['nx-phone']:GetActiveSim(source)main.lua

Returns the resolved active SIM record for a player.

exports['nx-phone']:GetActiveSimId(source)main.lua

Returns the player's active SIM ID.

exports['nx-phone']:GetActivePhoneNumber(source)main.lua

Returns the player's active SIM phone number.

exports['nx-phone']:GetSourceBySimId(simId)main.lua

Returns the online source currently using a SIM ID.

exports['nx-phone']:GetSourceByPhoneNumber(phone)main.lua

Returns the online source currently using a phone number.

exports['nx-phone']:GetSimRegisteredOwner(simId)main.lua

Returns the character that originally registered a SIM.

exports['nx-phone']:ResolveSimByPhone(phone)main.lua

Resolves a phone number to SIM identity/owner/status data.

exports['nx-phone']:HasPhoneSignal(source)main.lua

Checks whether an online player currently has phone service.

exports['nx-phone']:GetPhoneSignal(source)main.lua

Returns a player's current signal bars/connected state.

exports['nx-phone']:BuildMessagesForPlayer(player)messages.lua

Builds the current message/chat payload for a QBCore player.

exports['nx-phone']:PushChatsToPlayer(source)messages.lua

Pushes the current message/chat payload to an online player.

exports['nx-phone']:SendMail(targetSource, rawMail)system-mail.lua

Delivers persistent system mail to an online player source.

exports['nx-phone']:SendSystemMail(targetSource, rawMail)system-mail.lua

Alias of SendMail for system integrations.

exports['nx-phone']:SetTransitTrainState(trainId, data)transit.lua

Overrides live state for a configured Transit train/service.

exports['nx-phone']:ClearTransitTrainState(trainId)transit.lua

Clears a Transit train override.

exports['nx-phone']:SetTransitPassengerCount(trainId, count)transit.lua

Overrides the passenger count for a Transit train.

exports['nx-phone']:GetTransitBoard()transit.lua

Returns the current Transit board payload.

Client events

Complete nx-phone:client:* event surface found in the Lua client files. Expand a module to see every registered event and its handler arguments. simInfoChanged is a local integration event emitted whenever the active SIM changes.

Prefer exports for integrations

Many events below are internal refresh/state events used by the phone itself. They are documented for completeness; use the public exports where an export exists.

Boosting3 events
boosting.lua
RegisterNetEvent('nx-phone:client:requestBoostingRefresh', function() end)
RegisterNetEvent('nx-phone:client:boostingUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:boostingNotice', function(payload) end)
Business4 events
business.lua
RegisterNetEvent('nx-phone:client:requestBusinessRefresh', function() end)
RegisterNetEvent('nx-phone:client:businessInvoiceReceived', function(invoice) end)
RegisterNetEvent('nx-phone:client:businessInvoiceUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:businessManagerNotice', function(payload) end)
Calendar4 events
calendar.lua
RegisterNetEvent('nx-phone:client:calendarChanged', function() end)
RegisterNetEvent('nx-phone:client:requestCalendarRefresh', function() end)
RegisterNetEvent('nx-phone:client:calendarInvite', function(payload) end)
RegisterNetEvent('nx-phone:client:calendarStatus', function(payload) end)
Calls9 events
calls.lua
RegisterNetEvent('nx-phone:client:callNumber', function(number) end)
RegisterNetEvent('nx-phone:client:outgoingCall', function(payload) end)
RegisterNetEvent('nx-phone:client:incomingCall', function(payload) end)
RegisterNetEvent('nx-phone:client:callAccepted', function(payload) end)
RegisterNetEvent('nx-phone:client:callEnded', function(payload) end)
RegisterNetEvent('nx-phone:client:missedCall', function(details) end)
RegisterNetEvent('nx-phone:client:setRemoteCallMuted', function(payload) end)
RegisterNetEvent('nx-phone:client:requestCallsRefresh', function() end)
RegisterNetEvent('nx-phone:client:renderCallsApp', function(payload) end)
Chopshop2 events
chopshop.lua
RegisterNetEvent('nx-phone:client:requestChopshopRefresh', function() end)
RegisterNetEvent('nx-phone:client:chopshopUpdated', function(payload) end)
Contacts4 events
contacts.lua
RegisterNetEvent('nx-phone:client:requestContactsRefresh', function() end)
RegisterNetEvent('nx-phone:client:contactsUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:contactShareReceived', function(payload) end)
RegisterNetEvent('nx-phone:client:contactShareStatus', function(payload) end)
Crypto3 events
crypto.lua
RegisterNetEvent('nx-phone:client:requestCryptoRefresh', function() end)
RegisterNetEvent('nx-phone:client:cryptoMarketUpdated', function() end)
RegisterNetEvent('nx-phone:client:cryptoNotification', function(payload) end)
Delivery3 events
delivery.lua
RegisterNetEvent('nx-phone:client:requestDeliveryRefresh', function() end)
RegisterNetEvent('nx-phone:client:deliveryUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:deliveryNotification', function(payload) end)
Details2 events
details.lua
RegisterNetEvent('nx-phone:client:requestDetailsRefresh', function() end)
RegisterNetEvent('nx-phone:client:refreshDetails', function() end)
Documents2 events
documents.lua
RegisterNetEvent('nx-phone:client:documentsChanged', function() end)
RegisterNetEvent('nx-phone:client:requestDocumentsRefresh', function() end)
Gallery / Camera3 events
gallery.lua
RegisterNetEvent('nx-phone:client:requestGalleryRefresh', function() end)
RegisterNetEvent('nx-phone:client:startSelfieCamera', function() end)
RegisterNetEvent('nx-phone:client:galleryPhotoReceived', function(payload) end)
Garage2 events
garage.lua
RegisterNetEvent('nx-phone:client:requestGarageRefresh', function() end)
RegisterNetEvent('nx-phone:client:garageChanged', function() end)
GhostDrop2 events
ghostdrop.lua
RegisterNetEvent('nx-phone:client:requestGhostDropRefresh', function() end)
RegisterNetEvent('nx-phone:client:ghostdropUpdated', function(payload) end)
Guber4 events
guber.lua
RegisterNetEvent('nx-phone:client:requestGuberRefresh', function() end)
RegisterNetEvent('nx-phone:client:guberUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:guberNotification', function(payload) end)
RegisterNetEvent('nx-phone:client:guberNewRequest', function(payload) end)
Housing1 event
housing.lua
RegisterNetEvent('nx-phone:client:housingUpdated', function() end)
Job Centre3 events
jobcenter.lua
RegisterNetEvent('nx-phone:client:requestJobCenterRefresh', function() end)
RegisterNetEvent('nx-phone:client:jobCenterUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:jobCenterInvite', function(jobLabel) end)
Lemon List3 events
lemon-list.lua
RegisterNetEvent('nx-phone:client:renderAdverts', function(payload) end)
RegisterNetEvent('nx-phone:client:newAdvertNotification', function(poster, category, message) end)
RegisterNetEvent('nx-phone:client:requestAdvertsRefresh', function() end)
Core / SIM / Hardware3 events
main.lua
RegisterNetEvent('nx-phone:client:appAccessUpdated', function(apps) end)
RegisterNetEvent('nx-phone:client:phoneHardwareUpdated', function(hardware) end)
AddEventHandler('nx-phone:client:simInfoChanged', function(data) end)
Messages4 events
messages.lua
RegisterNetEvent('nx-phone:client:requestMessagesRefresh', function() end)
RegisterNetEvent('nx-phone:client:renderMessagesChats', function(payload) end)
RegisterNetEvent('nx-phone:client:messageTyping', function(payload) end)
RegisterNetEvent('nx-phone:client:incomingMessageNotify', function(payload) end)
OxyRun3 events
oxyrun.lua
RegisterNetEvent('nx-phone:client:requestOxyRunRefresh', function() end)
RegisterNetEvent('nx-phone:client:oxyRunUpdated', function(payload) end)
RegisterNetEvent('nx-phone:client:oxyRunNotification', function(payload) end)
Pinger4 events
ping.lua
RegisterNetEvent('nx-phone:client:requestPingerRefresh', function() end)
RegisterNetEvent('nx-phone:client:incomingPing', function(payload) end)
RegisterNetEvent('nx-phone:client:pingAccepted', function(payload) end)
RegisterNetEvent('nx-phone:client:pingStatus', function(payload) end)
Settings2 events
settings.lua
RegisterNetEvent('nx-phone:client:requestSettingsRefresh', function() end)
RegisterNetEvent('nx-phone:client:applySettings', function(settings) end)
System Mail6 events
system-mail.lua
RegisterNetEvent('nx-phone:client:requestSystemMailRefresh', function() end)
RegisterNetEvent('nx-phone:client:systemMailChanged', function() end)
RegisterNetEvent('nx-phone:client:sendMail', function() end)
RegisterNetEvent('nx-phone:client:sendSystemMail', function() end)
RegisterNetEvent('nx-phone:client:receiveSystemMail', function(mail) end)
RegisterNetEvent('nx-phone:client:systemMailStatus', function(payload) end)
Towing2 events
towing.lua
RegisterNetEvent('nx-phone:client:requestTowingRefresh', function() end)
RegisterNetEvent('nx-phone:client:towingUpdated', function(payload) end)
Transit2 events
transit.lua
RegisterNetEvent('nx-phone:client:requestTransitRefresh', function() end)
RegisterNetEvent('nx-phone:client:transitUpdated', function() end)
Twitter / Twatter12 events
twitter.lua
RegisterNetEvent('nx-phone:client:requestTwitterRefresh', function() end)
RegisterNetEvent('nx-phone:client:twitterNewTweet', function(tweet) end)
RegisterNetEvent('nx-phone:client:twitterTweetDeleted', function(tweetId) end)
RegisterNetEvent('nx-phone:client:twitterTweetMetrics', function(metrics) end)
RegisterNetEvent('nx-phone:client:twitterFeedRefresh', function() end)
RegisterNetEvent('nx-phone:client:twitterVerificationChanged', function(citizenid, verified) end)
RegisterNetEvent('nx-phone:client:twitterAvatarChanged', function(citizenid, avatar) end)
RegisterNetEvent('nx-phone:client:twitterProfileChanged', function(profile) end)
RegisterNetEvent('nx-phone:client:twitterPremiumChanged', function(payload) end)
RegisterNetEvent('nx-phone:client:twitterNotification', function(payload) end)
RegisterNetEvent('nx-phone:client:twitterModerated', function(payload) end)
RegisterNetEvent('nx-phone:client:twitterAccountModerated', function(payload) end)
VaultRoute2 events
vaultroute.lua
RegisterNetEvent('nx-phone:client:requestVaultRouteRefresh', function() end)
RegisterNetEvent('nx-phone:client:vaultrouteUpdated', function(payload) end)

Server events

Complete nx-phone:server:* registered event surface plus the local simChanged integration event emitted by the server.

Business1 event
business.lua
RegisterNetEvent('nx-phone:server:business:notificationAction', function(raw) end)
Calendar1 event
calendar.lua
RegisterNetEvent('nx-phone:server:respondCalendarInvite', function(payload) end)
Calls6 events
calls.lua
RegisterNetEvent('nx-phone:server:answerCall', function(payload) end)
RegisterNetEvent('nx-phone:server:setCallMuted', function(payload) end)
RegisterNetEvent('nx-phone:server:voiceJoinFailed', function(payload) end)
RegisterNetEvent('nx-phone:server:endCall', function(payload) end)
RegisterNetEvent('nx-phone:server:refreshCalls', function() end)
RegisterNetEvent('nx-phone:server:phoneUnavailable', function() end)
Contacts1 event
contacts.lua
RegisterNetEvent('nx-phone:server:respondContactShare', function(payload) end)
Lemon List1 event
lemon-list.lua
RegisterNetEvent('nx-phone:server:requestAdverts', function() end)
Core / SIM / Hardware5 events
main.lua
RegisterNetEvent('nx-phone:server:updateSignal', function(bars, connected) end)
RegisterNetEvent('nx-phone:server:requestAppAccess', function() end)
RegisterNetEvent('nx-phone:server:registerPhoneProp', function(netId) end)
RegisterNetEvent('nx-phone:server:removePhoneProp', function(netId) end)
AddEventHandler('nx-phone:server:simChanged', function(sourceId, oldSim, newSim) end)
Messages2 events
messages.lua
RegisterNetEvent('nx-phone:server:refreshChats', function() end)
RegisterNetEvent('nx-phone:server:setMessageTyping', function(otherPhone, typing) end)
Pinger2 events
ping.lua
RegisterNetEvent('nx-phone:server:acceptPing', function(payload) end)
RegisterNetEvent('nx-phone:server:declinePing', function(payload) end)
System Mail1 event
system-mail.lua
RegisterNetEvent('nx-phone:server:createSystemMail', function(rawMail) end)

Before opening a ticket

  • Confirm nx-phone-ui starts before nx-phone
  • Confirm qb-core, oxmysql, ox_inventory and lvs_interact are running
  • For calls, confirm pma-voice is running
  • Confirm the phone and SIM items are non-stackable and the SIM is installed inside the physical phone
  • Check F8 and server console errors and include the exact error in your ticket
  • State the affected app and any optional integration being used
ZX Hunting Documentation
ZX HUNTING · VERSION 2.2.0

ZX Hunting documentation.

Contract hunting for QBox with NX Phone Job Centre tasks, tracking clues, protected hunting-rifle gameplay, animal quality, harvesting, processing and selling.

FrameworkQBox + ox_inventory

The resource is built around server-validated contracts and uses nx-phone to gate and synchronize Hunting Job Centre groups.

Install ZX Hunting →

Requirements

Start every required dependency before zx_hunting. The supplied manifest declares all five resources below as dependencies.

FRAMEWORKqbx_core

Player/framework access and the QBox environment used by the hunting resource.

LIBRARYox_lib

Callbacks, notifications, progress bars and shared utility functions.

INVENTORYox_inventory

Hunting items, work stashes, processing, metadata and sale inventory.

INTERACTIONlvs_interact

Hunter NPC and world/station interactions.

PHONEnx-phone

Job Centre group readiness and synchronized hunting contract tasks.

No SQL required

ZX Hunting keeps active contracts in memory. Contracts intentionally reset on resource/server restart, so there is no hunting database import.

Installation

Use this order for a clean install. The important parts are the ox_inventory item merge, the existing hunting rifle weapon entry and the NX Phone Hunting Job Centre entry.

  1. 1
    Upload the resource

    Place the folder in your resources directory and keep the resource name as zx_hunting.

  2. 2
    Install the required dependencies

    Make sure qbx_core, ox_lib, ox_inventory, lvs_interact and nx-phone are installed and working first.

  3. 3
    Merge the hunting items

    Open zx_hunting/items.lua and copy its item definitions into the main item table in ox_inventory/data/items.lua. Add matching images to ox_inventory/web/images if you use custom artwork.

  4. 4
    Check the hunting rifle

    Confirm weapon_huntingrifle exists in ox_inventory/data/weapons.lua. Do not add the rifle as a normal item from items.lua; the resource expects the weapon entry.

  5. 5
    Enable Hunting in NX Phone Job Centre

    Your phone needs a Job Centre entry with Name = 'hunting'. Players must create/join that group and the leader must enable Ready for Jobs before the contract option appears.

  6. 6
    Review config.lua

    Set the hunter location, contract routes, tracking markers, rewards, quality grading, processor stations, selling prices and any NX Phone values you want to change.

  7. 7
    Set your start order

    Ensure ZX Hunting only after QBox, ox resources, LVS Interact and NX Phone have started.

  8. 8
    Test one complete contract

    Create a Hunting group in Job Centre, set it ready, take a contract, inspect every track, kill the tracked deer with the hunting rifle, harvest all five parts, then test processing and selling.

server.cfg
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure lvs_interact
ensure nx-phone
ensure zx_hunting

NX Phone Job Centre entry

Hunting job
{
    Name = 'hunting',
    Label = 'Hunter',
    Icon = 'fa-crosshairs',
    Category = 'Outdoor work',
    Description = 'Create a hunting group, mark it ready, and collect animal contracts from the hunter.',
    Sort = 15,
    MaxMembers = 4
}

How a contract works

  1. 1
    Ready a Hunting group

    Open NX Phone Job Centre, create or join the Hunting group and have the leader enable Ready for Jobs.

  2. 2
    Accept a contract

    The hunter chooses one configured route and sends the group toward the hunting area.

  3. 3
    Track the deer

    Inspect each clue in order. The deer is only spawned after the final track is completed.

  4. 4
    Make a valid kill

    The configured hunting rifle is restricted to the active contract deer and hunting zone. Shot placement and extra hits affect the quality score.

  5. 5
    Harvest the animal

    Inspect the body and harvest Head, Hide, Legs, Meat and finally the Carcass. Rewards carry animal/quality metadata.

  6. 6
    Process or sell

    Process fur/meat through the configured private work stashes or sell accepted hunting goods to the hunter.

config.lua breakdown

The complete hunting setup is controlled from config.lua. These cards cover every top-level section in the supplied v2.2.0 build.

Typical edits
Config.CancelCommand = 'cancelhunt'
Config.ContractCooldownSeconds = 900
Config.RequiredKnife = 'hunting_knife'
Config.HuntingWeaponItem = 'weapon_huntingrifle'

Config.NXPhone.enabled = true
Config.NXPhone.job = 'hunting'

-- Base sale price before rarity/quality multipliers
Config.Selling.items.boxed_meat.price = 435
config.luaConfig
DebugRequiredKnifeCancelCommandKnifeImageAnimalCleanupSecondsContractCooldownSecondsMaxHarvestDistanceHuntingWeaponHuntingWeaponItemHuntingWeaponZoneToleranceHuntingWeaponNotifyCooldown

Core gameplay and safety settings. This is where you change the required hunting knife, cancel command, hunting rifle, cooldowns, cleanup time and harvesting distance.

config.luaConfig.Tracking
inspectDurationinteractDistancedrawDistancemarker.typemarker.scalemarker.colour

Controls the tracking-clue interaction, how far clues render and the appearance of the ground markers used while following the animal trail.

config.luaConfig.AnimalVariants
idlabelrarityweightpriceMultiplierhealthMultipliermoveRateblipColourcolourtrophyScore

Defines the random animal variants. The supplied build includes Whitetail Deer, Trophy Stag and Legendary Stag with different rarity weights and sale multipliers.

config.luaConfig.Quality
defaultScoreunreportedScoreextraHitPenaltyplacementsruinedCausestiers

Controls shot-quality grading. Edit bone groups, penalties, ruined kill causes, quality thresholds and the sale multiplier for Perfect, Pristine, Good, Poor and Ruined animals.

config.luaConfig.Hunter
modelcoordsscenarioblip.enabledblip.spriteblip.colourblip.scaleblip.label

Sets the hunting-contract NPC, its animation/scenario and the map blip used to find the hunter.

config.luaConfig.Target
distance

Sets the interaction distance used around the hunter/target interactions.

config.luaConfig.NXPhone
enabledresourcejobtaskDurationSecondscompletionClearDelayMs

Controls the NX Phone Job Centre gate and synchronized hunting tasks. Disable this integration with enabled = false if you do not want Job Centre readiness to control contracts.

config.luaConfig.FurProcessing
tickslotsmaxWeightinteractDistancestations.cutstations.cleanstations.box

Configures the private ox_inventory fur-processing stashes, processing speed, coordinates, accepted input items and output amounts.

config.luaConfig.MeatProcessing
tickslotsmaxWeightinteractDistancestations.cutstations.cleanstations.box

Configures the meat cutting, cleaning and boxing stations. Each stage validates its allowed inputs and preserves hunting metadata.

config.luaConfig.Selling
tickslotsmaxWeightstashinventoryLabelmoneyItemitems

Controls the hunting-goods buyer, accepted items and base sale prices. Quality and animal rarity multipliers are applied on top of these base values.

config.luaConfig.InspectionAnimation
cutDictcutClipknifePropknifeBoneknifePositionknifeRotation

Controls the animation and visible knife prop used while harvesting animal parts in the inspection UI.

config.luaConfig.Parts
headhidelegsmeatcarcassitemminmaxdurationrequiresOthers

Defines every harvestable part, its ox_inventory item, quantity and harvest duration. The carcass can be forced to remain locked until the other cuts are finished.

config.luaConfig.Contracts
orderlabelsubtitletierrequiredLabeldifficultydistanceLabelaccentanimalModelroutesarearadiustracksanimalSpawns

Defines the available contract tiers and all route variation. Each route has its own hunting zone, ordered tracking clues and multiple possible animal spawn positions.

Items & weapons

Copy the supplied item definitions from items.lua into ox_inventory. The hunting rifle is different: it must remain a weapon definition in ox_inventory/data/weapons.lua.

HARVESTAnimal rewards

Deer Head, Deer Hide, Deer Leg, Deer Meat and Deer Carcass are produced during harvesting and carry hunting metadata.

PROCESSINGProcessed goods

Cut Fur, Clean Fur, Boxed Fur, Cut Meat, Clean Meat and Boxed Meat are used by the fur/meat production chains.

TOOLSHunting knife

The default required item is hunting_knife, controlled by Config.RequiredKnife.

WEAPONHunting rifle

The configured weapon is WEAPON_HUNTINGRIFLE / weapon_huntingrifle. Server/client safety checks prevent normal misuse during contracts.

Client exports

No public client exports in v2.2.0

The supplied client/main.lua does not register any FiveM exports(...). This section is included deliberately so integrations do not rely on an export that does not exist.

ZX Hunting currently communicates through its own server callbacks/events and the NX Phone Job Centre integration. If a future build adds exports, they can be listed here without changing the documentation structure.

Client events

The hunting client registers one network event from NX Phone. The two lifecycle handlers below are included separately because they are FiveM runtime events rather than public ZX Hunting network events.

event nameparameterregistration
NX Phone integration1 event
client eventclient/main.lua
RegisterNetEvent('nx-phone:client:jobCenterUpdated')
nx-phone:client:jobCenterUpdated
payload
FiveM lifecycle handlers2 handlers
client lifecycleclient/main.lua
AddEventHandler('onClientResourceStart')
onClientResourceStart
resource
client lifecycleclient/main.lua
AddEventHandler('onResourceStop')
onResourceStop
resource

Server events

These are the registered ZX Hunting server events in the supplied build. They are primarily internal gameplay events and are server-validated, so external resources should not fire them blindly.

ZX Hunting network events6 events
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:registerAnimal')
zx_hunting:server:registerAnimal
tokennetId
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:cancelContract')
zx_hunting:server:cancelContract
token
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:startProcessor')
zx_hunting:server:startProcessor
processorTypestationId
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:stopProcessor')
zx_hunting:server:stopProcessor
no parameters
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:startSelling')
zx_hunting:server:startSelling
no parameters
server eventserver/main.lua
RegisterNetEvent('zx_hunting:server:stopSelling')
zx_hunting:server:stopSelling
no parameters
FiveM server handlers3 handlers
server handlerserver/main.lua
AddEventHandler('weaponDamageEvent')
weaponDamageEvent
senderdata
server lifecycleserver/main.lua
AddEventHandler('onResourceStop')
onResourceStop
resource
server lifecycleserver/main.lua
AddEventHandler('playerDropped')
playerDropped
no parameters

Commands

client commandclient/main.lua
/cancelhunt

Cancels the player's current hunting contract. The name is configurable through Config.CancelCommand. A partial cooldown is applied when a contract is cancelled.

Before opening a ticket

  • Confirm qbx_core, ox_lib, ox_inventory, lvs_interact and nx-phone all start before zx_hunting.
  • Confirm every entry from items.lua exists in ox_inventory/data/items.lua.
  • Confirm weapon_huntingrifle exists as a weapon in ox_inventory/data/weapons.lua.
  • Confirm NX Phone has a Hunting Job Centre entry using the same Config.NXPhone.job value.
  • Make sure the Hunting group leader has enabled Ready for Jobs before testing the hunter contract interaction.
  • Check both F8 and server console and include the exact error plus the contract stage where it occurred.
ZX Banking Documentation
ZX BANKING · VERSION 1.0.0

ZX Banking documentation.

Installation, configuration and developer reference for the supplied zx-banking QBox build.

FrameworkQBox + oxmysql

Multiple accounts, transfers, PIN security, activity logs, society accounts, loans, cheques and ATM functionality.

Install ZX Banking →

Requirements

The resource manifest directly depends on oxmysql, qbx_core, ox_lib and qbx_custom_radial. The supplied Lua also calls ox_inventory for cheque items and lvs_interact for bank-ped interactions.

COREQBox

qbx_core provides player, job, gang and money data.

DATABASEoxmysql

Required for banking, account, loan, cheque and activity persistence.

UI / INTERACTIONox_lib + qbx_custom_radial

Used for progress/notifications and the ATM radial interaction.

INTEGRATIONSox_inventory + lvs_interact

Cheque items use ox_inventory and bank peds use lvs_interact in the supplied build.

Installation

  1. Upload the folder as zx-banking inside your server resources.
  2. Import the included zx-banking.sql into the same database used by your QBox server.
  3. If cheques are enabled, add an ox_inventory item matching Config.ChequeItem. The default item name is cheque.
  4. Review Config.BusinessAccounts and Config.GangAccounts so their job/gang names match your QBox setup.
  5. Start all dependencies before zx-banking.
server.cfg
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure lvs_interact
ensure qbx_custom_radial
ensure zx-banking

For the server-side admin banking command, grant the ACE permission used by the resource:

server.cfg
add_ace group.admin zx-banking.admin allow

config.lua breakdown

The main configuration areas from the supplied build are below. Bank and ATM locations, business/gang accounts and loan tiers can all be edited directly in config.lua.

AccountsConfig.MaxAccounts · Config.AccountTypes · Config.StartingBalance · Config.RequireEmptyOnDelete · Config.MaxMembersPerAccount

Controls how many accounts players can own, which account types can be created, starting balance, account deletion rules and shared-account member limits.

TransactionsConfig.MinTransactionAmount · Config.MaxTransactionAmount · Config.MaxTransactionHistory · Config.TransferFeePercent · Config.FreeTransferBetweenOwnAccounts

Sets transaction limits, stored history size, transfer fees and whether transfers between a player’s own accounts are fee-free.

Rate limitingConfig.RateLimits

Per-action cooldowns for Deposit, Withdraw and Transfer requests. Set a value to 0 to disable that specific limit.

PIN securityConfig.PINEnabled · Config.PINMaxAttempts · Config.PINLockoutSeconds

Controls the 4-digit PIN system, failed-attempt limit and temporary lockout duration.

Activity logsConfig.ActivityLogEnabled · Config.ActivityLogMaxEntries

Stores who performed actions on shared/society accounts and controls history retention.

Savings interestConfig.InterestEnabled · Config.InterestRate · Config.InterestMinBalance · Config.InterestMaxPayout · Config.InterestTypes

Controls daily interest payouts for eligible account types.

Debt interestConfig.DebtInterestEnabled · Config.DebtInterestRate · Config.DebtInterestMinBalance

Controls interest charged against sufficiently negative bank balances.

ChequesConfig.ChequeEnabled · Config.ChequeItem · Config.ChequeExpiryDays · Config.ChequeMaxAmount · Config.ChequeMinAmount

Controls cheque availability, ox_inventory item name, expiry and amount limits.

Freeze & notificationsConfig.FreezeEnable · Config.CanFreezeMainAccount · Config.NotifyOnSuccess

Controls account freeze functionality and optional success notifications.

Discord loggingConfig.DiscordWebhook · Config.DiscordColor · Config.DiscordLogDeposit · Config.DiscordLogWithdraw · Config.DiscordLogTransfer · Config.DiscordLogFreeze · Config.DiscordLogNewAccount · Config.DiscordLogDelete · Config.DiscordLogLoans

Configures optional webhook logging and which banking actions are sent.

Banks & ATMsConfig.BankPeds · Config.ATMModels · Config.ATMRange

Defines bank ped locations/labels and the ATM models/range used by the ATM interaction.

Business accountsConfig.BusinessAccounts

Pre-creates job accounts with IDs, labels, QBox job names, starting balances and optional bankAuth requirements.

Gang accountsConfig.GangAccounts

Pre-creates gang accounts matched against the player active QBox gang and optional bankAuth grade permission.

LoansConfig.LoanEnabled · Config.LoanTiers · Config.MaxActiveLoans · Config.BlockLoansOnDefault · Config.LoanGracePeriodSeconds

Controls loan availability, tier amount/interest/repayment/interval, active-loan limits and default handling.

Cheques & loans

CHEQUESInventory-backed cheques

Writing a cheque deducts the amount immediately. Cheques carry metadata in ox_inventory, can be cashed, cancelled by the issuer while pending, and expire according to Config.ChequeExpiryDays.

LOANSTiered repayments

Loan tiers define principal, interest rate, repayment amount and daily/weekly interval. Missed payments can enter a grace period and default handling can freeze the personal account.

The latest ZX SQL uses zx_banking_activity, zx_banking_cheques, zx_banking_loans and zx_banking_loan_payments.

Client exports

The supplied client.lua does not register any public ZX Banking client exports. Use the registered events for UI flow and the server exports below for external resource integrations.

No public client exports are registered in version 1.0.0.

Server exports

These are all public exports registered by the supplied server.lua. Prefer these from external resources instead of firing internal banking transaction events directly.

server exportserver.lua
exports['zx-banking']:GetPlayerIBAN(citizenid)

Returns the player personal IBAN/bank ID, or nil if no banking row exists. Returns: string | nil.

server exportserver.lua
exports['zx-banking']:GetIBANDetails(iban)

Returns account details for either a personal IBAN or a society/business IBAN. Returns: table | nil.

server exportserver.lua
exports['zx-banking']:GetPlayerBankAccounts(citizenid)

Returns the personal account plus shared/society accounts the citizen can access. Returns: table.

server exportserver.lua
exports['zx-banking']:GetSocietyAccount(iban)

Returns society/business account balance, frozen state and members. Returns: table | nil.

server exportserver.lua
exports['zx-banking']:AddAccountMoney(citizenid, amount, reason)

Adds money to a personal bank account and writes a deposit transaction. Returns: boolean, error?.

server exportserver.lua
exports['zx-banking']:RemoveAccountMoney(citizenid, amount, reason)

Removes money from a personal bank account after frozen/balance checks and writes a withdrawal transaction. Returns: boolean, error?.

server exportserver.lua
exports['zx-banking']:AddSocietyMoney(iban, amount, txType, reason, fromIban)

Adds money to a society/business/gang account and records the transaction. Returns: boolean, newBalance | error.

server exportserver.lua
exports['zx-banking']:RemoveSocietyMoney(iban, amount, txType, reason, toIban)

Removes money from a society/business/gang account after validation and records the transaction. Returns: boolean, newBalance | error.

server exportserver.lua
exports['zx-banking']:CreateTransaction(iban, txType, label, amount)

Adds a transaction-history entry without moving money. Supports deposit, withdraw and transfer types. Returns: boolean, error?.

server exportserver.lua
exports['zx-banking']:issueCheque(fromCitizenid, toName, amount, note, toServerid)

Issues a cheque programmatically. When toServerid is supplied the cheque item is delivered through ox_inventory. Returns: chequeId | nil, error?.

server exportserver.lua
exports['zx-banking']:GetAccount(accountName)

RX-style lookup by personal citizenid or society account ID. Returns normalised account information. Returns: table | nil.

Quick examples

server.lua
local iban = exports['zx-banking']:GetPlayerIBAN(citizenid)

local ok, err = exports['zx-banking']:AddAccountMoney(
    citizenid,
    2500,
    'Mission payout'
)

local society = exports['zx-banking']:GetSocietyAccount('police')

local chequeId, chequeErr = exports['zx-banking']:issueCheque(
    citizenid,
    'John Smith',
    5000,
    'Vehicle sale',
    targetServerId
)

Client events

These are the registered network events in client.lua. Most are server → client UI/state events used internally by ZX Banking.

ZX Banking client events22 events
Opens the full banking interface with account, transaction and configuration data. eventclient
RegisterNetEvent('zx-banking:client:open')
zx-banking:client:open

client.lua

data
client
RegisterNetEvent('zx-banking:client:openATM')
zx-banking:client:openATM

client.lua

data
Returns the result of a deposit, withdrawal or transfer to the UI. eventclient
RegisterNetEvent('zx-banking:client:actionResult')
zx-banking:client:actionResult

client.lua

successmessage
Shows a banking notification in the NUI or through ox_lib when the UI is closed. eventclient
RegisterNetEvent('zx-banking:client:notify')
zx-banking:client:notify

client.lua

messagenotifyType
Returns the result of deleting an account. eventclient
RegisterNetEvent('zx-banking:client:deleteResult')
zx-banking:client:deleteResult

client.lua

success
client
RegisterNetEvent('zx-banking:client:memberResult')
zx-banking:client:memberResult

client.lua

successmessage
client
RegisterNetEvent('zx-banking:client:updateMembers')
zx-banking:client:updateMembers

client.lua

accountIdmembers
client
RegisterNetEvent('zx-banking:client:accountCreated')
zx-banking:client:accountCreated

client.lua

acct
Returns a PIN verification result to the PIN screen. eventclient
RegisterNetEvent('zx-banking:client:pinResult')
zx-banking:client:pinResult

client.lua

result
Confirms whether a PIN change/set operation succeeded. eventclient
RegisterNetEvent('zx-banking:client:setPINResult')
zx-banking:client:setPINResult

client.lua

success
Returns the player PIN for the See PIN view. eventclient
RegisterNetEvent('zx-banking:client:showPINResult')
zx-banking:client:showPINResult

client.lua

rawPIN
Shows an automatically generated PIN, including on first open. eventclient
RegisterNetEvent('zx-banking:client:newPINGenerated')
zx-banking:client:newPINGenerated

client.lua

rawPIN
Displays the activity log for an account. eventclient
RegisterNetEvent('zx-banking:client:activityLog')
zx-banking:client:activityLog

client.lua

accountIdentries
client
RegisterNetEvent('zx-banking:client:accountFrozen')
zx-banking:client:accountFrozen

client.lua

accountIdfrozen
Pushes a live balance update to an open banking session. eventclient
RegisterNetEvent('zx-banking:client:updateBalance')
zx-banking:client:updateBalance

client.lua

accountIdbalance
Pushes a new transaction row to the current account. eventclient
RegisterNetEvent('zx-banking:client:addTransaction')
zx-banking:client:addTransaction

client.lua

accountIdtx
Force-closes the banking interface and releases NUI focus. eventclient
RegisterNetEvent('zx-banking:client:close')
zx-banking:client:close

client.lua

no parameters
Returns cheque history/list data to the Cheques screen. eventclient
RegisterNetEvent('zx-banking:client:chequeList')
zx-banking:client:chequeList

client.lua

cheques
Confirms a cheque was created and passes the cheque details to the UI. eventclient
RegisterNetEvent('zx-banking:client:chequeWritten')
zx-banking:client:chequeWritten

client.lua

data
Tells the UI that cheque history changed and should be refreshed. eventclient
RegisterNetEvent('zx-banking:client:chequeListUpdated')
zx-banking:client:chequeListUpdated

client.lua

no parameters
Returns active loans, payment history and configured loan tiers. eventclient
RegisterNetEvent('zx-banking:client:loansData')
zx-banking:client:loansData

client.lua

loanshistorytiers
Returns the result of requesting or repaying a loan. eventclient
RegisterNetEvent('zx-banking:client:loanResult')
zx-banking:client:loanResult

client.lua

successmessage
FiveM client lifecycle1 handler
client lifecycleclient.lua
AddEventHandler('onResourceStop')
onResourceStop

Removes the ATM radial option and spawned bank peds when zx-banking stops.

res

Server events

These are all registered ZX Banking server network events in the supplied build. They are primarily internal UI/gameplay endpoints and perform their own player/account checks. External resources should use the server exports for account operations wherever possible.

ZX Banking server events21 events
Builds the player banking payload and requests the full UI to open. eventserver
RegisterNetEvent('zx-banking:server:requestOpen')
zx-banking:server:requestOpen

server.lua

no parameters
Builds the ATM payload and requests the ATM interface to open. eventserver
RegisterNetEvent('zx-banking:server:requestOpenATM')
zx-banking:server:requestOpenATM

server.lua

no parameters
server
RegisterNetEvent('zx-banking:server:verifyPIN')
zx-banking:server:verifyPIN

server.lua

data
Returns the stored raw PIN to the player for the See PIN function. eventserver
RegisterNetEvent('zx-banking:server:showPIN')
zx-banking:server:showPIN

server.lua

no parameters
Sets or changes the player banking PIN. eventserver
RegisterNetEvent('zx-banking:server:setPIN')
zx-banking:server:setPIN

server.lua

data
server
RegisterNetEvent('zx-banking:server:getActivityLog')
zx-banking:server:getActivityLog

server.lua

data
Handles deposit, withdrawal and transfer requests with server-side validation. eventserver
RegisterNetEvent('zx-banking:server:action')
zx-banking:server:action

server.lua

data
Creates a new supported player account. eventserver
RegisterNetEvent('zx-banking:server:createAccount')
zx-banking:server:createAccount

server.lua

data
Deletes an eligible player-created account. eventserver
RegisterNetEvent('zx-banking:server:deleteAccount')
zx-banking:server:deleteAccount

server.lua

data
Adds a player to an eligible shared account. eventserver
RegisterNetEvent('zx-banking:server:addMember')
zx-banking:server:addMember

server.lua

data
Removes a member from a shared account. eventserver
RegisterNetEvent('zx-banking:server:removeMember')
zx-banking:server:removeMember

server.lua

data
Freezes or unfreezes an eligible account. eventserver
RegisterNetEvent('zx-banking:server:freezeAccount')
zx-banking:server:freezeAccount

server.lua

data
Renames a player-created account. eventserver
RegisterNetEvent('zx-banking:server:renameAccount')
zx-banking:server:renameAccount

server.lua

data
Validates a loan tier and creates a new loan when eligible. eventserver
RegisterNetEvent('zx-banking:server:requestLoan')
zx-banking:server:requestLoan

server.lua

data
Processes a manual repayment against an active/defaulted loan. eventserver
RegisterNetEvent('zx-banking:server:repayLoan')
zx-banking:server:repayLoan

server.lua

data
Loads the player loan list and repayment history. eventserver
RegisterNetEvent('zx-banking:server:getLoans')
zx-banking:server:getLoans

server.lua

no parameters
Creates a cheque, deducts its value and gives the configured cheque item. eventserver
RegisterNetEvent('zx-banking:server:writeCheque')
zx-banking:server:writeCheque

server.lua

data
Validates and cashes a cheque from the player inventory. eventserver
RegisterNetEvent('zx-banking:server:cashCheque')
zx-banking:server:cashCheque

server.lua

data
Cancels an eligible pending cheque and refunds the issuer. eventserver
RegisterNetEvent('zx-banking:server:cancelCheque')
zx-banking:server:cancelCheque

server.lua

data
Loads recent cheques issued by the current player. eventserver
RegisterNetEvent('zx-banking:server:getCheques')
zx-banking:server:getCheques

server.lua

no parameters
Forwards a banking notification back to the calling player. eventserver
RegisterNetEvent('zx-banking:server:notifySelf')
zx-banking:server:notifySelf

server.lua

msgntype
FiveM server lifecycle1 handler
server lifecycleserver.lua
AddEventHandler('onResourceStart')
onResourceStart

Initialises/prepares configured banking accounts when the resource starts.

resourceName

Commands

client commandclient.lua
/bank

Development/fallback command that requests the normal banking interface to open.

admin commandserver.lua
/bank resetpin <serverid>

Generates a new random 4-digit PIN. Requires zx-banking.admin ACE permission unless run from server console.

admin commandserver.lua
/bank setpin <serverid> <pin>

Sets a specific 4-digit PIN for an online player.

admin commandserver.lua
/bank balance <serverid>

Prints the online player bank balance to the server console.

admin commandserver.lua
/bank freeze <serverid>

Freezes the player personal account.

admin commandserver.lua
/bank unfreeze <serverid>

Unfreezes the player personal account.

Before opening a ticket

  • Confirm oxmysql, qbx_core, ox_lib and qbx_custom_radial start before zx-banking.
  • Confirm ox_inventory is running and the item named by Config.ChequeItem exists if cheques are enabled.
  • Confirm lvs_interact is running if bank ped interactions do not appear.
  • Confirm zx-banking.sql was imported and the ZX Banking tables exist.
  • Check that configured QBox job/gang names match Config.BusinessAccounts and Config.GangAccounts.
  • For admin commands, confirm the account/group has zx-banking.admin ACE permission.
  • Include both F8 and server-console errors when requesting support.
ZX Towing Documentation
ZX TOWING · VERSION 1.0.0

ZX Towing documentation.

Installation, configuration and the complete exported/callback/event surface from the supplied zx-towing build.

Framework bridgeStandalone · Qbox · QBCore · ESX

Career towing with an animated flatbed, dynamic contracts, progression, upgrades, multiplayer recovery crews and server-authoritative rewards.

Install ZX Towing →

Requirements

The resource manifest requires oxmysql, ox_lib and ox_target. The framework bridge can run in standalone mode or connect to Qbox, QBCore or ESX through Config.Server.Framework.

DATABASEoxmysql

Stores player progression, history, active missions, reward claims and company statistics.

CORE LIBox_lib

Provides callbacks, notifications and shared helper functionality.

INTERACTIONSox_target

Used for dispatcher, vehicle attachment and depot/mission interactions.

FRAMEWORKOptional bridge

Set standalone, qbox, qbcore or esx in the server configuration.

Animated flatbed included

The supplied build streams its own flatbed vehicle/deck and controls the moving bed inside zx-towing. No separate gs_flatbed resource is required.

Installation

  1. Upload the resource folder as zx-towing into your FiveM resources directory.
  2. Import sql/install.sql into the same MySQL/MariaDB database used by your server.
  3. Open config/server.lua and set Config.Server.Framework to standalone, qbox, qbcore or esx.
  4. Review config/shared.lua for depots, tow trucks, job types, locations, progression, multiplayer, modifiers and vehicle-key integration.
  5. Start oxmysql, ox_lib, ox_target and your selected framework before zx-towing.
  6. Grant the admin ACE permission if staff will use the towing administration commands.
server.cfg
ensure oxmysql
ensure ox_lib
ensure ox_target

# Start your selected framework here when required.
# Example for Qbox:
ensure qbx_core

ensure zx-towing
Admin ACE
add_ace group.admin zx-towing.admin allow

Database

Run the included sql/install.sql once before starting the resource. It creates the following five tables:

PLAYERzx-towing_players

XP, level, upgrades, job totals, earnings, distance and last-job state.

HISTORYzx-towing_history

Completed, failed and cancelled contract history with payouts, XP and duration.

RECOVERYzx-towing_active_missions

Persisted active mission payload used by the mission-recovery system.

SECURITYzx-towing_reward_claims

Completion-token ledger that prevents duplicate reward claims.

COMPANYzx-towing_company_stats

Server-wide completed jobs, failed jobs, distributed earnings and total distance.

Shared configuration

config/shared.lua contains the majority of gameplay tuning. These are the main top-level configuration areas in the supplied build.

GeneralConfig.Locale · Config.Debug · Config.DistanceUnit

Locale/debug switches plus whether distances are displayed in miles or kilometres.

DepotsConfig.Depots

Dispatcher ped, depot blip, company-truck bays, return/storage points, interaction radius and duty behavior.

Tow trucksConfig.TowTruckCategories · Config.CompanyVehicle

Company truck models, attachment type/offsets, vehicle-class limits, plate format, fuel and per-player truck limits.

Vehicle keysConfig.VehicleKeys

Selects automatic, preset, none or custom key handling; also controls unlock protection, retries, resource names and debug output.

LocationsConfig.PickupLocations · Config.DeliveryLocations

Pools of pickup and delivery locations, minimum levels, map areas, headings and dropoff radii.

Vehicle poolsConfig.VehiclePools

Vehicle model pools grouped by category and mapped to the correct tow-truck category.

Operator upgradesConfig.OperatorUpgrades · Config.PremiumVehicleDispatch

Long-term paid upgrades such as premium vehicle intel, negotiation and other high-value dispatch benefits.

Job typesConfig.JobTypes

Defines contract labels, descriptions, minimum levels, truck categories, vehicle pools, delivery types, stages and timed-job eligibility.

DifficultyConfig.Difficulties · Config.DifficultyOrder

Controls Easy through Heavy Recovery reward ranges, XP, multipliers, time limits and progression access.

Career levelsConfig.Levels · Config.MaxLevel

Ten towing ranks from Trainee to Elite Operator, cumulative XP thresholds and maximum unlocked difficulty.

MultiplayerConfig.Multiplayer · Config.MultiVehicleJobs

Crew sizes, invite timing, co-op bonus rules and level-scaled multi-vehicle contract capacity.

ModifiersConfig.Modifiers · Config.ModifierPool · Config.MaxModifiersPerJob

Optional contract conditions such as damage/timing/handling modifiers and how many may be attached to one job.

Job boardConfig.JobBoard

Controls board refresh timing, generated job count and expiry behavior.

Mission flowConfig.Mission · Config.MissionOutro · Config.MissionRecovery

Interaction radii, cancellation rules, completion report/outro and recovery behavior for persisted missions.

Distance & payConfig.DistanceBonus · Config.PickupDistancePay · Config.Distances

Distance calculations, displayed route bands and distance-based payout bonuses.

Legacy/co-op switchConfig.CoopJobs

Compatibility configuration retained alongside the newer Multiplayer crew system.

Server & client configuration

config/server.lua contains server-only/security settings and secrets. config/client.lua contains presentation and local mission polling settings.

Framework & moneyConfig.Server.Framework · Config.Server.PaymentAccount

Choose standalone, qbox, qbcore or esx and select cash/bank for towing payouts.

AdminConfig.Server.AdminPermission

ACE permission used by all towing administration commands. Default: zx-towing.admin.

Concurrency & cooldownConfig.Server.JobCooldownSecs · Config.Server.ServerMaxConcurrentJobs

Controls the player cooldown after a completion and an optional server-wide active-job cap.

Security limitsConfig.Server.RateLimits · PickupValidationRadius · DropoffValidationRadius

Server-side callback rate limiting and authoritative pickup/dropoff distance tolerances.

Reward capsConfig.Server.MaxXPPerJob · Config.Server.MaxPaymentPerJob

Hard caps applied after all server-calculated XP/payment modifiers.

LoggingConfig.Server.Logging · Config.Server.DiscordWebhook

Console logging and optional server-only Discord webhook logging.

Client markersConfig.Client.drawPickupZone · drawDropoffZone · zoneMarkerColour

Controls visible pickup/dropoff ground markers.

Client navigationConfig.Client.waypoint* · pickupBlip · dropoffBlip

Controls mission waypoint colours and pickup/dropoff blip presentation.

Client timingConfig.Client.proximityCheckInterval · missionPollInterval · timerTickMs

Controls client polling frequencies and the NUI contract timer tick.

Tablet effectsConfig.Client.tabletEffects

Controls the native FiveM blur effect while the towing tablet is open.

Keep the webhook server-side

Config.Server.DiscordWebhook is intentionally stored only in config/server.lua. Do not move it into shared/client configuration.

Vehicle-key integration

Set Config.VehicleKeys.System to the exact key resource you run. auto detects the first supported resource, while custom uses the prepared functions in config/server.lua or config/client.lua.

config/shared.lua
Config.VehicleKeys.System = 'auto'
-- auto | none | qbx_vehiclekeys | qb-vehiclekeys
-- Renewed-Vehiclekeys | wasabi_carlock | t1ger_keys
-- qs-vehiclekeys | MrNewbVehicleKeys | vehiclekeys | custom

If you select custom, choose CustomSide = 'server' or 'client' and implement Config.VehicleKeys.CustomServerGive/Remove or CustomClientGive/Remove. Company flatbeds also use a replicated native-unlock guard so temporary work trucks stay accessible across OneSync ownership migration.

Client exports

These four exports are registered by the supplied client build and are the cleanest way for another client resource to interact with ZX Towing.

client exportclient/main.lua
exports['zx-towing']:OpenTowingTablet()

Opens the ZX Towing dispatch tablet programmatically for the local player.

client exportclient/jobs.lua
exports['zx-towing']:IsOnTowingJob()

Returns whether the local player currently has an active towing mission.

client exportclient/jobs.lua
exports['zx-towing']:GetActiveTowingJob()

Returns the local active mission data table, or nil when no towing job is active.

client exportclient/jobs.lua
exports['zx-towing']:IsTowingMissionVehicle(entity)

Returns whether the supplied local entity is currently being handled as the active mission vehicle.

Server exports

These six server exports expose player progression and active-job state to other server resources.

server exportserver/main.lua
exports['zx-towing']:GetPlayerTowingLevel(source)

Returns the player’s current towing career level.

server exportserver/main.lua
exports['zx-towing']:GetPlayerTowingXP(source)

Returns the player’s total towing XP.

server exportserver/main.lua
exports['zx-towing']:AddTowingXP(source, xp)

Adds server-authoritative towing XP to a player and applies progression/level-up handling.

server exportserver/main.lua
exports['zx-towing']:GetPlayerTowingStats(source)

Returns the full towing stats payload for the player.

server exportserver/main.lua
exports['zx-towing']:HasActiveTowingJob(source)

Returns true when the player currently owns an active towing mission.

server exportserver/main.lua
exports['zx-towing']:CancelTowingJob(source)

Cancels the player’s active towing mission through the normal server mission cleanup path.

Server callbacks

The towing tablet and mission client communicate with the server mainly through ox_lib callbacks. The signatures below show the client-facing arguments; FiveM/ox_lib supplies source to the registered server callback automatically.

ZX Towing lib.callback endpoints24 callbacks
server callbackserver/main.lua
lib.callback.await('zx-towing:getPlayerStats', false)
zx-towing:getPlayerStats

Returns the current player stats/progression payload used by the tablet.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:purchaseUpgrade', false, upgradeId)
zx-towing:purchaseUpgrade

Purchases an operator upgrade after validating the upgrade ID, balance, rate limit and progression rules.

upgradeId
server callbackserver/main.lua
lib.callback.await('zx-towing:getJobs', false)
zx-towing:getJobs

Returns the current dynamic job-board entries available to the player.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:previewJob', false, jobId)
zx-towing:previewJob

Returns preview data for a selected job ID, including eligibility/error information.

jobId
server callbackserver/main.lua
lib.callback.await('zx-towing:acceptJob', false, jobId, mode)
zx-towing:acceptJob

Accepts a job in solo or multiplayer mode and returns the authoritative mission payload.

jobIdmode
server callbackserver/main.lua
lib.callback.await('zx-towing:getRecoveryState', false)
zx-towing:getRecoveryState

Returns the current persisted/recoverable mission state for the player.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:recoverMission', false, action)
zx-towing:recoverMission

Runs a supported mission-recovery action after server validation and rate limiting.

action
server callbackserver/main.lua
lib.callback.await('zx-towing:getMultiplayerState', false)
zx-towing:getMultiplayerState

Returns the player’s current towing crew/invite/multiplayer state.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:createCrew', false)
zx-towing:createCrew

Creates a new towing crew for the player.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:inviteCrewPlayer', false, target)
zx-towing:inviteCrewPlayer

Invites another server player to the caller’s towing crew.

target
server callbackserver/main.lua
lib.callback.await('zx-towing:respondCrewInvite', false, crewId, accept)
zx-towing:respondCrewInvite

Accepts or declines a towing crew invitation.

crewIdaccept
server callbackserver/main.lua
lib.callback.await('zx-towing:leaveCrew', false)
zx-towing:leaveCrew

Removes the caller from their current towing crew.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:kickCrewMember', false, target)
zx-towing:kickCrewMember

Allows the crew leader to remove a member from the crew.

target
server callbackserver/main.lua
lib.callback.await('zx-towing:setDuty', false, state)
zx-towing:setDuty

Sets the player on or off towing duty.

state
server callbackserver/main.lua
lib.callback.await('zx-towing:requestTowTruck', false, depotId, categoryId)
zx-towing:requestTowTruck

Validates whether the player may request a company tow truck from the specified depot/category.

depotIdcategoryId
server callbackserver/main.lua
lib.callback.await('zx-towing:registerCompanyTruck', false, netId, plate)
zx-towing:registerCompanyTruck

Registers a client-created company flatbed with the server and applies configured vehicle-key handling.

netIdplate
server callbackserver/main.lua
lib.callback.await('zx-towing:registerMissionVehicle', false, netId)
zx-towing:registerMissionVehicle

Registers the spawned mission vehicle in the authoritative mission/entity state.

netId
server callbackserver/main.lua
lib.callback.await('zx-towing:arriveAtPickup', false)
zx-towing:arriveAtPickup

Validates that the player has reached the current pickup location.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:reportRecoveryStage', false, stage)
zx-towing:reportRecoveryStage

Reports a named recovery/winch stage to the server mission state machine.

stage
server callbackserver/main.lua
lib.callback.await('zx-towing:reportVehicleAttached', false, netId)
zx-towing:reportVehicleAttached

Validates that the expected mission vehicle has been attached to the tow truck.

netId
server callbackserver/main.lua
lib.callback.await('zx-towing:cancelJob', false)
zx-towing:cancelJob

Cancels the active contract and returns any configured penalty data.

no client arguments
server callbackserver/main.lua
lib.callback.await('zx-towing:completeDelivery', false, nonce)
zx-towing:completeDelivery

Validates the mission nonce and final delivery, then returns the server-calculated reward result.

nonce
server callbackserver/flatbed.lua
lib.callback.await('zx-towing:flatbed:deleteBedServer', false, truckNet, suppliedBedNet)
zx-towing:flatbed:deleteBedServer

Deletes the registered moving flatbed deck safely before the parent truck is removed.

truckNetsuppliedBedNet
server callbackserver/flatbed.lua
lib.callback.await('zx-towing:flatbed:purgeNearbyBeds', false, bedNets)
zx-towing:flatbed:purgeNearbyBeds

Validated cleanup fallback for nearby orphaned flatbed deck objects.

bedNets
Use the exports when possible

Callbacks such as job acceptance, vehicle registration and delivery completion are internal mission endpoints with security/rate-limit checks. External scripts should prefer the public exports unless they intentionally participate in the towing mission flow.

Client events

The supplied build registers 17 networked ZX Towing client events. Most are server → client mission, cooperative, flatbed or vehicle-key synchronization events.

ZX Towing client network events17 events
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:missionRestored')
zx-towing:client:missionRestored

Restores a saved towing mission on the client and re-enters the normal mission-accepted flow.

missionData
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:missionStateUpdate')
zx-towing:client:missionStateUpdate

Applies server mission-state changes such as failure or cancellation.

data
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:coopProgress')
zx-towing:client:coopProgress

Updates synchronized cooperative delivery counts, team size and crew member state in the mission UI.

data
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:coopStageAssigned')
zx-towing:client:coopStageAssigned

Reassigns the local operator to another vehicle/stage if cooperative crew assignments change.

missionData
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:coopContractComplete')
zx-towing:client:coopContractComplete

Shows the final cooperative result and cleans up the local mission/truck/vehicle state.

result
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:levelUp')
zx-towing:client:levelUp

Displays the towing level-up notification and newly unlocked progression information.

data
client eventclient/jobs.lua
RegisterNetEvent('zx-towing:client:statsUpdate')
zx-towing:client:statsUpdate

Pushes a refreshed player stats payload into the towing tablet UI.

stats
client eventclient/vehicles.lua
RegisterNetEvent('zx-towing:client:forceDeleteEntity')
zx-towing:client:forceDeleteEntity

Validated client cleanup fallback for a networked mission/company entity.

netIdkind
client eventclient/multiplayer.lua
RegisterNetEvent('zx-towing:client:multiplayerState')
zx-towing:client:multiplayerState

Updates the Multiplayer section of the tablet with current crew/invite state.

state
client eventclient/multiplayer.lua
RegisterNetEvent('zx-towing:client:coopMissionAssigned')
zx-towing:client:coopMissionAssigned

Starts the assigned cooperative mission stage for the local crew member.

missionData
client eventbridge/client.lua
RegisterNetEvent('zx-towing:client:vehicleKeys:give')
zx-towing:client:vehicleKeys:give

Runs the configured client-side vehicle-key adapter for the company truck.

netIdplatesystem
client eventbridge/client.lua
RegisterNetEvent('zx-towing:client:vehicleKeys:remove')
zx-towing:client:vehicleKeys:remove

Removes temporary company-truck keys through the configured client-side adapter.

netIdplatesystem
client eventclient/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:forceDeleteClient')
zx-towing:flatbed:forceDeleteClient

Removes an orphaned streamed flatbed deck object on clients that can see it.

bedNet
client eventclient/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:moveClient')
zx-towing:flatbed:moveClient

Moves the animated flatbed deck down or up on the network owner client.

truckNetlowering
client eventclient/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:attachClient')
zx-towing:flatbed:attachClient

Runs the physical winch/attach sequence on the mission vehicle’s network owner and acknowledges the result.

truckNetvehicleNetrequestId
client eventclient/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:detachClient')
zx-towing:flatbed:detachClient

Detaches the mission vehicle from the flatbed on the network owner client.

truckNetvehicleNet
client eventclient/towing.lua
RegisterNetEvent('zx-towing:flatbed:attachResult')
zx-towing:flatbed:attachResult

Returns the final asynchronous flatbed attach result to the requesting towing client.

requestIdsuccessreason
Local-only mission handlers2 handlers
client eventclient/jobs.lua
AddEventHandler('zx-towing:client:missionAccepted')
zx-towing:client:missionAccepted

Local-only mission bootstrap handler used after accepting/restoring/assigning a contract. It is registered with AddEventHandler rather than RegisterNetEvent.

missionData
client eventclient/jobs.lua
AddEventHandler('zx-towing:client:missionCancelled')
zx-towing:client:missionCancelled

Local-only mission cancellation handler that clears the current client mission and displays any configured penalty.

penaltyData

Server events

These nine network events are registered server-side. The flatbed events route work to the relevant network owner, while the crew and key events update validated mission/key state.

ZX Towing server network events9 events
server eventserver/main.lua
RegisterNetEvent('zx-towing:server:crewActivity')
zx-towing:server:crewActivity

Updates a whitelisted live crew-status/activity state for the sender’s own cooperative contract.

activitydetailvehicleIndex
server eventbridge/server.lua
RegisterNetEvent('zx-towing:vehicleKeys:give')
zx-towing:vehicleKeys:give

Compatibility entry point that grants keys only when the net ID matches the caller’s registered company truck.

netIdplate
server eventbridge/server.lua
RegisterNetEvent('zx-towing:vehicleKeys:remove')
zx-towing:vehicleKeys:remove

Removes the caller’s temporary company-truck keys and disables the replicated unlock guard.

netIdplate
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:lower')
zx-towing:flatbed:lower

Routes a lower-bed request to the current network owner of a valid built-in flatbed.

truckNet
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:raise')
zx-towing:flatbed:raise

Routes a raise-bed request to the current network owner of a valid built-in flatbed.

truckNet
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:attach')
zx-towing:flatbed:attach

Starts the network-owner attach/winch request and tracks the request until acknowledgement or timeout.

truckNetvehicleNetrequestId
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:attachResult')
zx-towing:flatbed:attachResult

Accepts the physical attach acknowledgement only from the expected network owner, then forwards it to the requester.

requestIdsuccessreason
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:detach')
zx-towing:flatbed:detach

Routes a detach request to the network owner of the mission vehicle.

truckNetvehicleNet
server eventserver/flatbed.lua
RegisterNetEvent('zx-towing:flatbed:registerBed')
zx-towing:flatbed:registerBed

Registers the animated deck object against its flatbed truck after ownership and distance validation.

truckNetbedNet

Admin commands

All six server commands use Config.Server.AdminPermission, which defaults to zx-towing.admin.

admin commandserver/main.lua
/towinglevel <id> <level>

Sets a player’s towing level.

admin commandserver/main.lua
/towingxp <id> <amount>

Adds towing XP to a player.

admin commandserver/main.lua
/towingreset <id>

Resets a player’s towing progression.

admin commandserver/main.lua
/towingrefresh

Force-refreshes the dynamic towing job board.

admin commandserver/main.lua
/towingcancel <id>

Cancels the target player’s active towing mission.

admin commandserver/main.lua
/towingdebug <id>

Prints the target player’s active mission state to the server console.

Before opening a ticket

  • Confirm oxmysql, ox_lib and ox_target start before zx-towing.
  • Confirm sql/install.sql was imported and all five zx-towing_* tables exist.
  • Confirm Config.Server.Framework matches the framework actually running on your server.
  • If the job board is empty, check the server console for oxmysql errors and review the configured job-board/level requirements.
  • If flatbed keys fail, set Config.VehicleKeys.System to the exact preset, verify the resource folder name and temporarily enable Config.VehicleKeys.Debug.
  • If a vehicle sits incorrectly on the bed, tune attachOffset / attachRotation for the configured truck model.
  • If players receive no payout, verify Config.Server.PaymentAccount and the money bridge for your selected framework/standalone setup.
  • If lib.callback errors appear, confirm @ox_lib/init.lua is loading and ox_lib starts first.
  • Include the client F8 error and matching server-console error when requesting support.