Skip to content

Configuration ​

Core settings live in shared/config.lua. Each app area has its own file in shared/config/:

FileTableCovers
shared/config.luaConfig.*Framework, voice, keys, item, number format, walk mode, prop and animation, weather, uploads, App Store, rate limit, settings
shared/config/comms.luaConfig.CommsCalls, ringtone, payphones, contacts, messages, Darkchat
shared/config/city.luaConfig.CityWallet, mail, garage, groups, job center
shared/config/social.luaConfig.SocialChirp, Yellow Pages, businesses, maps, calendar, stocks, transit, news
shared/config/media.luaConfig.MediaAllowed image hosts, AirDrop, photos, camera, notes, files

Secrets

Config files are shared with clients. Upload tokens, webhooks and the passcode pepper are read from server convars. See Installation → Secrets.

Core ​

OptionDefaultDescription
Config.Framework'auto''qbx', 'qb', 'esx', or auto-detect (qbx → qb → esx)
Config.Voice'auto''pma-voice', 'saltychat', 'yaca', 'none', or auto-detect. Without voice, calls are UI-only
Config.VoiceCallChannelOffset10000pma-voice only: phone calls use channel offset + callId, away from channels other scripts use
Config.OpenKey / Config.Command'F1' / 'phone'Default key binding (rebindable) and command
Config.CallKeys{ accept = 'Y', decline = 'BACK' }Ring-mode keys while the phone is put away. false disables a key
Config.KeepAppMinutes5Minutes the open app stays mounted under the lock screen (0 = close on lock)
Config.RequireItem / Config.ItemNamesfalse / { 'phone' }Require one of these items to open and use the phone. Uses ox_inventory if started, otherwise the framework inventory
Config.NumberFormat'555-####'Phone number pattern, # = random digit. Keep at least 4 #
Config.ShowServerIdtrueServer ID next to the clock (hidden in streamer mode)
Config.Locale'en'NUI language
Config.NoPhoneText"You don't have a phone."Feed message when the item is missing
Config.WalkModetrueKeep walking and driving while the phone is open. Keyboard focus only while typing
Config.DisabledControlscamera, attack, weapon wheel, pause, chat, …Controls disabled every frame while the phone is open in walk mode
Config.Propprop_npc_phone_02 on bone 28422Hand prop: model, bone, offset, rotation
Config.Animcellphone@, in-car anim@cellphone@in_car@pstext and call enter / base / exit clips
Config.WeatherCity / Config.Weather'Los Santos' / per GTA weather typeWidget label and °C per weather type (GTA has no temperature)
Config.NotifySoundText_Arrive_ToneFrontend sound for notifications while the phone is closed
Config.UploadfivemanagePhoto upload provider: 'fivemanage', 'discord', 'none'. Token and webhook come from convars
Config.StoreApps{ { id = 'darkchat', item = 'vpn' } }App Store gating (see below)
Config.RateLimit{ perSecond = 15, burst = 40 }Per-player server RPC token bucket
Config.EnforcePasscodefalseReject app RPCs until a passcode-protected phone is unlocked
Config.SettingsAllowed player settings keys and types, defaults, size limit
Config.DebugfalseVerbose logging

App Store gating ​

Apps that aren't listed can be installed freely.

lua
Config.StoreApps = {
  { id = 'darkchat', item = 'vpn' },                                   -- needs the item
  { id = 'mdt', job = 'police' },                                      -- needs the job
  { id = 'mdt', job = { 'police', 'sheriff' }, grade = 2, onduty = true }, -- list, min grade, on duty
}

Other resources can add entries at runtime with exports.np_phone:registerStoreApp(entry) (see Exports).

Player settings ​

lua
Config.Settings = {
  maxBytes = 16384,      -- max size of a player's settings JSON
  allowUnknown = true,   -- accept keys not listed below (^[%a][%w_]*$, ≤ 32 chars)
  keys = { wallpaper = 'string', volume = 'number', dnd = 'boolean', homeOrder = 'table', --[[ ... ]] },
  defaults = { theme = 'dark', wallpaper = 'clouds', ringtone = 'Reflection', volume = 0.6, use24h = true, --[[ ... ]] },
}

Comms (Config.Comms) ​

OptionDefaultDescription
ringTimeout30Seconds an outgoing call rings before it counts as missed
ringtoneRemote_Ring / Phone_SoundSet_MichaelFrontend sound. Nearby players hear it in 3D (state bag np_phoneRinging)
ringRange / ringInterval25.0 / 35003D ringtone range (m), re-trigger interval (ms)
hiddenPrefix'#31#'Hides the caller ID for one call
payphonestrueWalk up to a payphoneModels prop, press E, dial
payphoneDistance / payphoneCost / payphoneKey1.6 / 5 / 38 (E)
maxContacts500
shareDistance / shareTimeout3.0 / 60Contact sharing range (m) and prompt lifetime (s)
maxMessageLength / maxGroupMembers / pageSize1000 / 16 / 50
liveLocationMinutes / liveLocationInterval{ 15, 30, 60 } / 5000Offered durations; ms between updates
maxTransfer1000000Max in-chat money transfer
darkchatTTLHours / darkchatMaxChannels / darkchatMaxLength24 / 20 / 500

City (Config.City) ​

OptionDefaultDescription
bankName / cardBrand'Fleeca' / 'VISA'Shown on the wallet card
maxTransfer1000000Max single transfer, request or invoice
allowDeclineInvoicesfalseBusiness invoices and fines can't be declined (payment requests always can)
overdueWarnDays3Invoices due within N days show a banner
invoicePayoutnilfunction(invoice) called after a business invoice is paid. Credit the society account here
mailDomain'lsmail.com'Player addresses are first.last@<mailDomain>
govSendersLSPD, City Hall, DOJ, …Senders whose mail lands in the "Gov" folder
valetFee / impoundFee150 / 600
valetSpawnfalseBuilt-in valet spawn. Keep false when your garage script handles np_phone:garage:valet
impoundReleaseDbtrueqb/qbx: set player_vehicles.state = 1 on release
garages / defaultGarage / impoundGarage name → label and coords (waypoints)
groupMaxMembers / groupInviteTimeout / groupNearbyRadius6 / 120 / 10.0
groupJobssanitation, delivery, fishingJobs listed under "Available" in Groups
demoJob{ enabled = false }/np_phone_demojob to try the group job API. Never enable it on a live server
jobCenter / applyCooldown5 civilian jobs / 60Job center entries; "Apply" sends a mail with a waypoint

Example society payout:

lua
invoicePayout = function(invoice)
  if invoice.senderJob then exports['Renewed-Banking']:addAccountMoney(invoice.senderJob, invoice.amount) end
end,

Social (Config.Social) ​

OptionDefaultDescription
verifiedJobspolice, ambulance, news, …Chirp verified badge while on that job
chirpmaxLength = 280, maxImages = 4, anonymousTips = true, …
ypPostFee / ypExpireHours / ypMaxActivePerPlayer50 / 48 / 5Yellow Pages ads
ypCategoriesvehicles, homes, services, items, other
businesses / businessCacheSeconds9 businesses / 15"Open now": open while a player with that job is on duty
pois / placeIcons / maxPlacesMaps
calendarMaxEvents / calendarReminderCheck / calendarMaxInvites200 / 60 / 10
stockTickMinutes / stockHistory / stocks10 / 48 / 7 symbolsRandom-walk prices. crypto = true allows 4 decimals
transitticket price, lines and stopsDepartures computed from the in-game clock
newsJobs / newsNotifyAll{ 'news', 'weazel' } / falseWho can publish; Breaking News notification to everyone

Media (Config.Media) ​

OptionDefaultDescription
allowedHostsFiveManage, Discord CDNImage URLs players can save or show to others must be https on one of these hosts (or a subdomain). Add your custom CDN domain
sharedistance = 3.0, timeout = 45, maxPendingPerTarget = 3, label = 'contact'AirDrop. label = 'name' shows character names (metagaming risk)
photosmax = 500, pageSize = 60, maxAlbums = 30
cameraencoding = 'webp', quality = 0.85, cooldown = 1500, …allowDiscordClientUpload = false (see Upload security), keys
notesmax = 300, maxLength = 20000, maxFolders = 30
filesmax = 500, maxBody = 20000, types

np_* FiveM resources