Config
Basic configuration for the NProbleM Newspaper Script. Suitable for documentation use.
NMConfig = {}
-- Framework selection: 'esx' or 'qb'
NMConfig['Framework'] = 'qb'
-- SQL Resource configuration: only one should be true
NMConfig['SQL'] = {
['oxmysql'] = true, -- Use oxmysql (recommended for QBcore)
['ghmattimysql'] = false, -- Use ghmattimysql (alternative)
}
NMConfig['Target'] = {
targetType = 'qb', -- 'qb', 'ox' (defines how players interact)
}
-- General settings
NMConfig['General'] = {
webhookURL = '', -- Discord webhook URL for logging
currentNotifyResource = 'ox', -- Notification system: 'okok', 'native', 'qb', 'ox'
currentLocaleLanguage = 'en', -- Language for messages and prompts
maxPageLimit = 2, -- Maximum number of pages allowed in editor
boxSpace = 10, -- Newspaper Stand space capacity
Items = { -- Item names
newspaper = 'newspaper', -- Item name for newspaper
newspaperBox = 'newspaperbox', -- Item name for printed newspaper boxes
},
metadataScenario = 1,
-- 1 → Once distributed, newspapers in boxes stay the same.
-- Players get the edition that was there at the time of pickup, even if the company updates later.
-- 2 → Newspaper boxes always show the latest version.
-- When the company updates the newspaper, all boxes are automatically refreshed.
-- 3 → Players' newspapers are always live-updated.
-- When the company publishes a new edition, it instantly updates for everyone holding one.
rewardDistributor = true, -- Enable rewards for distributors
DistributorRewards = { 10, 30 }, -- Min and Max reward amounts for distributors
DistributorVehicleList = { -- Vehicle models for distributors
'rumpo',
'cruiser',
'fixter',
'burrito',
'speedo'
},
unemployedJobName = 'unemployed', -- Job name assigned when an employee is removed
unemployedJobGrade = 0, -- Job grade assigned when an employee is removed
adminLicenseIDs = { -- Character IDs with admin access to commands
'license:33380dcc70c58b515a4fd155b7bb6d2a0861b9af', -- Example License ID
'license:33380dcc70c58b515a4fd155b7bb6d2a0861b9af',
'license:e74040a8d5054ec4829f49d770e94c0a7fb3b8ee'
},
Commands = {
createNewspaperCompany = 'cnc', -- Command to create a newspaper company (admin only)
manageNewspaperCompanys = 'mnc', -- Command to manage newspaper companies (admin only)
createBox = 'cb' -- Command to create newspaper stands (admin only)
},
Buttons = { -- Key bindings for interactions
newspaper = {
prevPage = { key = 174, label = "Previous Page" },
nextPage = { key = 175, label = "Next Page" },
closeNewspaper = { key = 177, label = "Close Newspaper" },
},
createBox = {
increaseX = { key = 175, label = "Increase X" },
decreaseX = { key = 174, label = "Decrease X" },
increaseY = { key = 172, label = "Increase Y" },
decreaseY = { key = 173, label = "Decrease Y" },
increaseZ = { key = 96, label = "Increase Z" },
decreaseZ = { key = 97, label = "Decrease Z" },
confirm = { key = 191, label = "Confirm" },
close = { key = 177, label = "Close" },
}
},
ColorRanges = { -- Color ranges for newspaper stands
{ min = 0, max = 3, color = {r = 255, g = 0, b = 0}, blipColor = 1 },
{ min = 3, max = 6, color = {r = 255, g = 165, b = 0}, blipColor = 47 },
{ min = 6, max = 999, color = {r = 0, g = 255, b = 0}, blipColor = 2 },
},
}
Last updated