Agency-Blackmarket V2 Конфигурация
Живой чёрный рынок для FiveM на QBCore, Qbox, ESX или полностью в режиме standalone.

01Конфигурация
Быстрая установка · config.lua · Agency-Blackmarket V2
--[[ ============================================================================
AGENCY BLACKMARKET V2 · CONFIG
----------------------------------------------------------------------------
Every option in this file does something. Prices, levels, dealers, drop
points and police behaviour are all set here; wording is set in the
locales/ folder or, for your own text that survives updates, in
Config.Text at the bottom.
Coordinates: stand where you want a dealer or a drop and read your
position with any /coords tool, or use the admin page of /ablackmarket,
which saves spots in game without touching this file.
============================================================================ ]]
Config = {}
-- =============================================================================
-- 1. GENERAL
-- =============================================================================
Config.Locale = 'en' -- en de fr es pt it nl pl cs ro tr ru uk sv da fi hu hr el bg hi ja ko zh ar
Config.Debug = false -- extra lines in the server console and F8
-- 'auto' finds QBCore, Qbox or ESX by itself and runs standalone when none of
-- them is installed. Force one with 'qbcore', 'qbox', 'esx' or 'standalone'.
Config.Framework = 'auto'
-- 'auto' | 'ox' | 'qs' | 'framework' (qb-inventory, ps, lj, jpr and ESX)
Config.Inventory = 'auto'
Config.Currency = '$' -- written before every amount
-- Admins: the ACE agency.blackmarket, group.admin, or one of these groups.
Config.AdminGroups = { 'admin', 'god', 'superadmin' }
-- Messages: Agency-Notify when it runs, otherwise the menu's own cards.
-- Set to false to always use the menu's cards.
Config.UseAgencyNotify = true
-- =============================================================================
-- 2. MENU, INTERACTION AND COMMANDS
-- =============================================================================
Config.Menu = {
-- The one command of the resource. Opens your contacts anywhere: level,
-- orders with waypoints, runs, messages, the Companion app and, for
-- admins, the admin page.
command = 'ablackmarket',
key = '', -- default key for the command, '' = none (players can bind one in the GTA settings)
item = nil, -- an item needed to open it anywhere, e.g. 'burnerphone'; nil = no item
scale = 1.0, -- size of the menu, 0.8 to 1.3
}
Config.Interaction = {
key = 38, -- E, see docs.fivem.net/docs/game-references/controls
keyLabel = 'E', -- what the prompt shows
distance = 2.2, -- metres to a dealer or a drop
-- 'auto' uses ox_target or qb-target when one runs, the prompt otherwise.
-- 'ox_target' | 'qb-target' | false (always the prompt)
target = 'auto',
}
-- =============================================================================
-- 3. MONEY
-- =============================================================================
Config.Money = {
-- How dirty money exists on this server:
-- 'auto' ESX: the account below. Qbox: the item below. QBCore: the
-- item below when ox_inventory knows it, marked bills otherwise.
-- Standalone: the script keeps it (see Config.Standalone).
-- 'markedbills' QBCore marked bills, one item carrying its worth
-- 'item' a plain item where one piece is one dollar
-- 'account' an account of the framework (ESX black_money)
-- 'wallet' kept by this script
dirty = 'auto',
markedItem = 'markedbills',
item = 'black_money',
account = 'black_money',
-- What the dealers take, in this order. The player picks in the basket
-- when more than one is allowed. 'dirty' | 'cash' | 'bank'
buyWith = { 'dirty', 'cash' },
-- Agency Pay from Agency Phone. When the phone runs on this server, the
-- basket offers Agency Pay as well, for buying and for orders: the phone
-- opens, the player confirms the payment there and the money comes from
-- his bank account. Nothing to set up; enabled = false hides it.
-- resource the name of the Agency Phone resource
-- timeout seconds the player has to confirm on the phone
agencyPay = { enabled = true, resource = 'agency-phone', timeout = 90 },
}
-- =============================================================================
-- 4. REPUTATION
-- =============================================================================
-- Five levels by default. `rep` is the reputation a level starts at; the
-- rest are the perks of that level:
-- buy % off every purchase
-- sell % more for everything sold
-- launder % the laundry keeps
-- orders open orders at the same time
Config.Reputation = {
levels = {
{ name = 'Street Punk', rep = 0, buy = 0, sell = 0, launder = 25, orders = 1 },
{ name = 'Small Timer', rep = 50, buy = 5, sell = 3, launder = 22, orders = 1 },
{ name = 'Regular', rep = 150, buy = 10, sell = 6, launder = 20, orders = 2 },
{ name = 'Trusted', rep = 300, buy = 15, sell = 9, launder = 17, orders = 2 },
{ name = 'VIP', rep = 500, buy = 20, sell = 12, launder = 15, orders = 3 },
},
-- One point per `per` dollars, at least `min` per deal.
gain = {
buy = { per = 1000, min = 1 },
sell = { per = 1000, min = 1 },
launder = { per = 2500, min = 1 },
pickup = 2, -- extra points for collecting an order
},
-- Points lost for walking out on a dealer.
loss = {
refuseSurcharge = { 3, 8 }, -- said no when the dealer wanted more
refuseCut = { 5, 12 }, -- said no when the fence wanted a cut
},
}
-- =============================================================================
-- 5. DEALERS
-- =============================================================================
-- Every dealer has his own places, his own stock and his own services:
-- buy the market (items from Config.Items in his categories)
-- orders orders for pickup at a drop point
-- sell buys stolen goods (Config.Sell)
-- launder washes dirty money (Config.Launder)
-- jobs hands out courier runs (Config.Jobs)
-- `rotate` minutes until he moves to another of his places, 0 = never.
-- `hours` { from = 20, to = 6 } for night dealers, false = always there.
-- `blip` mode 'always' (everyone), 'known' (players who dealt with him),
-- 'never'. Sprites and colours: docs.fivem.net/docs/game-references/blips
Config.Dealers = {
{
id = 'vince',
label = 'Vince',
role = 'Dealer',
services = { buy = true, orders = true, jobs = true },
categories = { 'pistols', 'smgs', 'shotguns', 'rifles', 'melee', 'ammo', 'armor', 'tools' },
ped = { model = 's_m_y_dealer_01', scenario = 'WORLD_HUMAN_DRUG_DEALER' },
rotate = 120,
hours = false,
blip = { mode = 'always', sprite = 110, color = 1, scale = 0.8, label = 'Contact' },
places = {
vector4(-1318.80, -906.91, 11.31, 200.0),
vector4(-58.95, -1230.97, 28.84, 43.6),
vector4(134.53, -1276.06, 29.32, 291.3),
},
},
{
id = 'marlow',
label = 'Marlow',
role = 'Fence',
services = { sell = true, launder = true, jobs = true },
ped = { model = 'a_m_m_og_boss_01', scenario = 'WORLD_HUMAN_CLIPBOARD' },
-- The washing machine next to him. offset: metres to his right, in
-- front, up. false = laundering happens right where he stands.
laundry = { model = 'prop_washer_01', offset = vector3(1.8, 0.2, 0.0) },
rotate = 180,
hours = false,
blip = { mode = 'known', sprite = 500, color = 1, scale = 0.8, label = 'Fence' },
places = {
vector4(-1143.72, -1547.31, 4.38, 35.4),
vector4(-894.70, -1516.03, 5.02, 109.8),
},
},
}
-- Dealers show up for a player when he is this close, and vanish again past
-- the second value. Their positions never reach players further away.
Config.StreamDistance = { show = 120.0, hide = 160.0 }
-- =============================================================================
-- 6. THE MARKET
-- =============================================================================
Config.Categories = {
{ id = 'pistols', label = 'Pistols', icon = 'pistol' },
{ id = 'smgs', label = 'SMGs', icon = 'smg' },
{ id = 'shotguns', label = 'Shotguns', icon = 'shotgun' },
{ id = 'rifles', label = 'Rifles', icon = 'rifle' },
{ id = 'melee', label = 'Melee', icon = 'melee' },
{ id = 'ammo', label = 'Ammunition', icon = 'ammo' },
{ id = 'armor', label = 'Armor', icon = 'armor' },
{ id = 'tools', label = 'Tools', icon = 'tools' },
}
-- item the item name on QBCore and ESX (weapons: weapon_...)
-- ox the name in ox_inventory when it differs (ammo, armour)
-- price base price, the market moves it up and down (Config.Prices)
-- level reputation level needed to buy it
-- stock pieces per dealer, false = unlimited. Refills with Config.Stock.
-- order true = can be ordered for pickup, 'only' = order only (never over the counter)
-- ammo standalone only: the ammo type a piece gives, and how many rounds
Config.Items = {
-- Pistols
{ item = 'weapon_snspistol', label = 'SNS Pistol', category = 'pistols', price = 2400, level = 1, stock = 8, order = true },
{ item = 'weapon_pistol', label = 'Pistol', category = 'pistols', price = 3000, level = 1, stock = 8, order = true },
{ item = 'weapon_pistol50', label = 'Pistol .50', category = 'pistols', price = 4200, level = 2, stock = 5, order = true },
{ item = 'weapon_revolver', label = 'Heavy Revolver', category = 'pistols', price = 5200, level = 3, stock = 3, order = true },
-- SMGs
{ item = 'weapon_microsmg', label = 'Micro SMG', category = 'smgs', price = 6500, level = 2, stock = 4, order = true },
{ item = 'weapon_minismg', label = 'Mini SMG', category = 'smgs', price = 7200, level = 3, stock = 3, order = true },
{ item = 'weapon_smg', label = 'SMG', category = 'smgs', price = 8500, level = 3, stock = 3, order = true },
-- Shotguns
{ item = 'weapon_sawnoffshotgun', label = 'Sawed-Off Shotgun', category = 'shotguns', price = 7800, level = 3, stock = 3, order = true },
{ item = 'weapon_dbshotgun', label = 'Double Barrel Shotgun', category = 'shotguns', price = 8600, level = 3, stock = 2, order = true },
{ item = 'weapon_pumpshotgun', label = 'Pump Shotgun', category = 'shotguns', price = 9800, level = 4, stock = 2, order = true },
-- Rifles
{ item = 'weapon_compactrifle', label = 'Compact Rifle', category = 'rifles', price = 11000, level = 4, stock = 2, order = true },
{ item = 'weapon_assaultrifle', label = 'Assault Rifle', category = 'rifles', price = 13500, level = 4, stock = 2, order = 'only' },
{ item = 'weapon_carbinerifle', label = 'Carbine Rifle', category = 'rifles', price = 15000, level = 5, stock = 1, order = 'only' },
-- Melee
{ item = 'weapon_bat', label = 'Baseball Bat', category = 'melee', price = 350, level = 1, stock = 10, order = true },
{ item = 'weapon_crowbar', label = 'Crowbar', category = 'melee', price = 400, level = 1, stock = 8, order = true },
{ item = 'weapon_knife', label = 'Knife', category = 'melee', price = 550, level = 1, stock = 10, order = true },
{ item = 'weapon_switchblade', label = 'Switchblade', category = 'melee', price = 750, level = 1, stock = 8, order = true },
{ item = 'weapon_knuckle', label = 'Brass Knuckles', category = 'melee', price = 650, level = 2, stock = 6, order = true },
{ item = 'weapon_machete', label = 'Machete', category = 'melee', price = 950, level = 2, stock = 6, order = true },
-- Ammunition
{ item = 'pistol_ammo', ox = 'ammo-9', label = 'Pistol Ammo', category = 'ammo', price = 80, level = 1, stock = 60, order = true, ammo = { type = 'AMMO_PISTOL', rounds = 12 } },
{ item = 'shotgun_ammo', ox = 'ammo-shotgun', label = 'Shotgun Ammo', category = 'ammo', price = 110, level = 2, stock = 30, order = true, ammo = { type = 'AMMO_SHOTGUN', rounds = 8 } },
{ item = 'smg_ammo', ox = 'ammo-45', label = 'SMG Ammo', category = 'ammo', price = 120, level = 2, stock = 40, order = true, ammo = { type = 'AMMO_SMG', rounds = 20 } },
{ item = 'rifle_ammo', ox = 'ammo-rifle', label = 'Rifle Ammo', category = 'ammo', price = 180, level = 3, stock = 30, order = true, ammo = { type = 'AMMO_RIFLE', rounds = 30 } },
-- Armor
{ item = 'armor', ox = 'armour', label = 'Body Armor', category = 'armor', price = 1200, level = 1, stock = 10, order = true, armour = 50 },
{ item = 'heavyarmor', label = 'Heavy Armor', category = 'armor', price = 2400, level = 3, stock = 5, order = true, armour = 100 },
-- Tools
{ item = 'lockpick', label = 'Lockpick', category = 'tools', price = 180, level = 1, stock = 20, order = true },
{ item = 'advancedlockpick', label = 'Advanced Lockpick', category = 'tools', price = 650, level = 2, stock = 10, order = true },
{ item = 'electronickit', label = 'Electronic Kit', category = 'tools', price = 1800, level = 2, stock = 6, order = true },
{ item = 'drill', label = 'Drill', category = 'tools', price = 2600, level = 3, stock = 4, order = true },
{ item = 'thermite', label = 'Thermite', category = 'tools', price = 3900, level = 4, stock = 3, order = true },
{ item = 'trojan_usb', label = 'Trojan USB', category = 'tools', price = 4800, level = 4, stock = 2, order = 'only' },
}
-- Items your inventory does not know are left out on start, with one line in
-- the server console naming them. Set false to keep them in the menu anyway.
Config.HideUnknownItems = true
-- Where the menu takes item pictures from. 'auto' reads them from the
-- inventory that runs (ox, qs, qb, ps, lj, jpr). A URL of your own works too,
-- e.g. 'https://cdn.example.com/items/' (the file name is added), and false
-- shows the category icons instead.
Config.Images = 'auto'
-- =============================================================================
-- 7. PRICES, STOCK AND FLASH SALES
-- =============================================================================
Config.Prices = {
enabled = true,
interval = 20, -- minutes between two price moves
spread = 15, -- a price stays within this % around its base
step = 6, -- a price moves at most this % per interval
}
Config.Stock = {
enabled = true,
refill = 30, -- minutes between two refills of an item
amount = 2, -- pieces per refill, never above the item's stock
}
Config.FlashSale = {
enabled = true,
chance = 15, -- % per price move that a flash sale starts
items = { 1, 3 }, -- how many items are on sale
discount = { 15, 35 }, -- % off
minutes = 15,
-- Who hears about it in game: 'known' (players who dealt with the dealer
-- before), 'all' or 'none'. The Companion app hears it either way.
notify = 'known',
}
-- =============================================================================
-- 8. HAGGLING
-- =============================================================================
-- Before paying, a player can haggle once: a needle sweeps a bar and he has to
-- stop it in the gold zone. Hitting the middle gives the full discount.
Config.Haggle = {
enabled = true,
discount = { 4, 15 }, -- % off on a hit, the middle of the zone gives the top
zone = 16, -- width of the gold zone in % of the bar at level 1
zoneLevel = 2, -- the zone grows by this % per level above 1
period = 1.1, -- seconds for the needle to cross the bar once
miss = 8, -- % added to this deal after a miss, 0 = the dealer just says no
cooldown = 10, -- minutes before a player may haggle with the same dealer again
}
-- Now and then a dealer wants more before he hands anything over.
Config.Surcharge = {
enabled = true,
chance = 12, -- % of purchases
percent = { 10, 25 }, -- % on top
-- Walking away: reputation loss (Config.Reputation.loss), a chance of a
-- police alert and a chance the dealer leaves his spot.
alert = 25,
leave = 20,
}
-- =============================================================================
-- 9. SELLING TO THE FENCE
-- =============================================================================
Config.Sell = {
-- What the fence pays with: 'dirty' or 'cash'. With cash he keeps `cut` %.
payout = 'dirty',
cut = 15,
-- Now and then the fence wants a cut to keep quiet after a sale.
extortion = { chance = 12, percent = { 10, 20 }, alert = 30 },
items = {
{ item = 'rolex', label = 'Rolex Watch', price = { 700, 1200 }, level = 1 },
{ item = 'goldchain', label = 'Gold Chain', price = { 350, 700 }, level = 1 },
{ item = '10kgoldchain', label = '10k Gold Chain', price = { 900, 1500 }, level = 1 },
{ item = 'diamond_ring', label = 'Diamond Ring', price = { 1100, 1900 }, level = 2 },
{ item = 'goldbar', label = 'Gold Bar', price = { 2000, 3200 }, level = 2 },
{ item = 'laptop', label = 'Laptop', price = { 600, 1100 }, level = 1 },
{ item = 'tablet', label = 'Tablet', price = { 450, 900 }, level = 1 },
{ item = 'security_card_01', label = 'Security Card A', price = { 500, 900 }, level = 2 },
{ item = 'security_card_02', label = 'Security Card B', price = { 900, 1500 }, level = 3 },
{ item = 'cryptostick', label = 'Crypto Stick', price = { 2000, 3500 }, level = 4 },
},
}
-- =============================================================================
-- 10. LAUNDERING
-- =============================================================================
Config.Launder = {
min = 500,
max = 50000, -- per wash
cooldown = 5, -- minutes between two washes of one player
-- How long the machine runs: base seconds plus seconds per 1,000, capped.
time = { base = 8, per1000 = 0.5, max = 45 },
-- The fee comes from the player's level (Config.Reputation.levels.launder).
alert = 20, -- % police alert chance
-- Now and then the fence wants a cut first to keep quiet.
cut = { chance = 12, percent = { 10, 20 } },
}
-- =============================================================================
-- 11. ORDERS AND DROP POINTS
-- =============================================================================
Config.Orders = {
enabled = true,
prep = { 5, 12 }, -- minutes until an order waits at its drop
expire = 90, -- minutes a drop waits before the goods are gone
refund = 50, -- % of an expired order that comes back as dealer credit
maxPieces = 10, -- pieces per order
alert = 30, -- % police alert chance while collecting
pickupSeconds = 3,
-- Ordering without standing at the dealer (menu anywhere and the app) is
-- possible from this level on. false = only at the dealer.
remoteLevel = 2,
-- The bag or crate the goods lie in.
prop = 'prop_cs_heist_bag_02',
-- Drop points. Admins add more in game (/ablackmarket, admin page). With
-- an empty list the places of all dealers serve as drops, never the one a
-- dealer stands at.
drops = {
-- vector4(x, y, z, heading),
},
}
-- =============================================================================
-- 12. RUNS AND MESSAGES
-- =============================================================================
-- Dealers with the `jobs` service hand out courier runs: pick something up
-- at one place and hand it to a contact at another before the time runs out.
-- Paid in dirty money plus reputation. A run can draw the police, and a run
-- that is dropped or too late costs reputation.
Config.Jobs = {
enabled = true,
offers = 3, -- open runs per dealer at a time
refresh = 20, -- minutes until an open run nobody took is replaced
cooldown = 5, -- minutes between two runs of one player
pickupMinutes = 15, -- time to get to the pickup after taking a run
minutes = { 8, 12 }, -- time from the pickup to the contact, more for long routes
seconds = 3, -- picking up and handing over take this long
fail = 6, -- reputation lost for a run that is dropped or too late
alert = { pickup = 10, deliver = 15 }, -- % police alert chance, times the kind's alert
contact = { model = 'g_m_y_famca_01', scenario = 'WORLD_HUMAN_SMOKING' },
blips = {
pickup = { sprite = 478, color = 5 },
deliver = { sprite = 280, color = 2 },
},
-- What there is to move. level = reputation level needed, pay = dirty
-- money, rep = reputation, alert = police chance multiplier, dealers =
-- who hands it out (leave it out for every dealer with `jobs`).
-- A prop the game does not know is replaced by the bag of the drops.
kinds = {
{ id = 'package', label = 'Package', prop = 'prop_cs_package_01', level = 1, pay = { 1200, 2200 }, rep = { 4, 7 }, alert = 1.0 },
{ id = 'cash', label = 'Money bag', prop = 'prop_money_bag_01', level = 2, pay = { 2500, 4000 }, rep = { 6, 10 }, alert = 1.3, dealers = { 'marlow' } },
{ id = 'crate', label = 'Weapon crate', prop = 'prop_box_guncase_01a', level = 3, pay = { 4500, 7000 }, rep = { 9, 14 }, alert = 1.6, dealers = { 'vince' } },
},
-- Where runs start and end: vector4 points of your own. Empty = the drop
-- points (Config.Orders.drops, the ones added in game, or the dealers'
-- free places).
points = {},
minDistance = 300.0, -- metres between pickup and contact, where the points allow it
}
-- The Messages page of /ablackmarket: what the dealers write. Orders waiting
-- at a drop, runs, dealers who moved, flash sales and raids, each with a
-- waypoint where it helps.
Config.Messages = {
enabled = true,
keep = 30, -- messages kept per player
welcome = true, -- new players get a first message from a dealer with his spot
}
-- =============================================================================
-- 13. POLICE
-- =============================================================================
Config.Police = {
jobs = { 'police', 'sheriff', 'bcso', 'sasp', 'state', 'lspd' },
onDutyOnly = true,
minOnline = 0, -- dealers only trade with at least this many officers on duty
blockCops = true, -- officers get nothing from a dealer
nearby = 60.0, -- a dealer leaves when an officer comes this close
away = 15, -- minutes he stays away before he turns up at another place
-- % chance of an alert per action.
alerts = { buy = 10, sell = 15, launder = 20, pickup = 30 }, -- runs: Config.Jobs.alert
-- 'auto' finds ps-dispatch, cd_dispatch, qs-dispatch, rcore_dispatch,
-- core_dispatch, tk_dispatch, lb-tablet or origen_police. 'default' sends
-- a map blip and a message to the officers. 'custom' calls customAlert
-- below. 'none' turns alerts off.
dispatch = 'auto',
-- The title comes from the language file; add title = 'Your text' to set your own.
alert = { code = '10-66', blip = { sprite = 51, color = 1, scale = 1.0, seconds = 120 } },
-- customAlert = function(coords, data) end, -- data = { code, title, message, kind, source }
}
-- Standalone: players with the ACE in Config.Standalone.policeAce count as officers.
-- =============================================================================
-- 14. ACCESS
-- =============================================================================
Config.Access = {
jobs = {}, -- only these jobs may trade, empty = everyone
items = {}, -- items a player must carry to talk to a dealer, e.g. { 'burnerphone' }
}
-- =============================================================================
-- 15. STANDALONE
-- =============================================================================
-- Without QBCore, Qbox or ESX:
-- works: dealers, prices, stock, haggling, reputation, orders, runs,
-- messages, the app. Weapons, ammo and armour go straight to the
-- player.
-- money: 'auto' uses Agency-Banking when it runs, otherwise the script's
-- own wallet (cash and dirty money, admins can top it up with
-- /ablackmarket). 'hooks' uses the functions below.
-- fill in: other items (tools, stolen goods) need the item hooks below;
-- without them those items are left out of the menus.
Config.Standalone = {
money = 'auto', -- 'auto' | 'banking' | 'wallet' | 'hooks'
policeAce = 'agency.police', -- players with this ACE count as officers
adminAce = 'agency.blackmarket',
-- getMoney = function(src, account) return 0 end, -- account: 'cash' | 'bank' | 'dirty'
-- addMoney = function(src, account, amount) return true end,
-- removeMoney = function(src, account, amount) return true end,
-- itemCount = function(src, item) return 0 end,
-- addItem = function(src, item, amount) return true end,
-- removeItem = function(src, item, amount) return true end,
}
-- =============================================================================
-- 16. STORAGE
-- =============================================================================
-- Reputation, stock, orders and the app's devices are saved in the database
-- (table agency_blackmarket, created by itself) when oxmysql runs, otherwise
-- in the server's own key value store. Reputation from V1
-- (blackmarket_reputation) is taken over once, automatically.
Config.Storage = 'auto' -- 'auto' | 'mysql' | 'kvp'
-- =============================================================================
-- 17. COMPANION APP
-- =============================================================================
-- The Agency Companion app (iOS and Android) shows the market, prices, stock
-- and the player's level, orders for pickup, finds the dealers
-- and tells about moved dealers, ready orders, flash sales and raids.
Config.Companion = {
enabled = true,
relay = 'https://api.agencyg.de',
qrSeconds = 300, -- how long a pairing code stays valid
maxDevices = 3, -- phones per player
locateLevel = 1, -- from this level on the app (and the menu) can set a waypoint to a dealer (1 = everyone)
}
-- =============================================================================
-- 18. LOGS
-- =============================================================================
Config.Logs = {
webhook = '', -- a Discord webhook URL, '' = off
console = false, -- also print every deal in the server console (admin actions always are)
events = { buy = true, sell = true, launder = true, orders = true, jobs = true, admin = true },
}
-- =============================================================================
-- 19. YOUR OWN WORDING
-- =============================================================================
-- Any key from locales/en.lua, set here, beats every language file and
-- survives updates. Example: Config.Text = { prompt_talk = 'Talk to {name}' }
Config.Text = {}
02SQL файл
Необязательно: ресурс сам создаёт эти таблицы при запуске. Импортируйте файл, только если настраиваете базу данных вручную:
-- Agency Blackmarket V2
-- The resource creates this table by itself when oxmysql runs. Run this file
-- only if your database user may not create tables.
CREATE TABLE IF NOT EXISTS `agency_blackmarket` (
`scope` VARCHAR(16) NOT NULL,
`id` VARCHAR(96) NOT NULL,
`data` LONGTEXT NOT NULL,
`updated` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`scope`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- V1 kept reputation in `blackmarket_reputation`. V2 takes it over once on its
-- first start; the old table can be dropped afterwards:
-- DROP TABLE IF EXISTS `blackmarket_reputation`;
+Полезно знать
Каждая опция в config.lua на что-то влияет, всего 19 разделов, от дилеров до ваших собственных текстов. Места дилеров и закладки можно добавить и в игре на странице администратора, не трогая файл.
- Дилеры
- Config.Dealers задаёт каждого дилера: его услуги (buy, orders, sell, launder), категории, педа и его сценарий, минуты до переезда (rotate), часы работы, режим метки (always, known или never) и его места. Рядом со скупщиком стоит стиральная машина, размещённая со смещением.
- Предметы, цены и запас
- У каждой записи в Config.Items есть базовая цена, нужный уровень, запас на дилера и признак, можно ли её заказать (true или 'only' только под заказ). Config.Prices задаёт, как часто и насколько двигаются цены, Config.Stock, как быстро пополняется запас, а Config.FlashSale, как часто начинается распродажа, на сколько предметов и с какой скидкой.
- Торг и наценки
- Config.Haggle задаёт скидку, ширину золотой зоны и насколько она растёт с каждым уровнем, скорость стрелки, надбавку после промаха и паузу на каждого дилера. Config.Surcharge задаёт, как часто дилер хочет больше, насколько, и вероятность тревоги полиции или ухода дилера при отказе игрока.
- Заказы и закладки
- Config.Orders задаёт время подготовки, сколько ждёт закладка, долю, которая возвращается кредитом, штук в заказе, вероятность тревоги, уровень для заказа откуда угодно и модель сумки. Закладки задаются в drops; при пустом списке закладками служат места всех дилеров, но никогда не то, где сейчас стоит дилер.
- Полиция
- Config.Police перечисляет полицейские работы и задаёт, учитываются ли только сотрудники на смене, сколько их должно быть онлайн, получают ли полицейские что-то у дилера, расстояние, на котором дилер уходит, и на какое время, вероятность тревоги для каждого действия и систему dispatch.
- Standalone
- Config.Standalone.money выбирает для денег Agency-Banking, собственный кошелёк скрипта или ваши собственные хуки. Хуки предметов подключают любой инвентарь. Полицейские и администраторы определяются по ACE из policeAce и adminAce.
- Задания и сообщения
- Config.Jobs задаёт, сколько заданий предлагает каждый дилер, как часто они меняются, паузу между двумя заданиями, время до получения и до контакта, а также оплату, репутацию и риск полиции для каждого вида задания. Услуга jobs в Config.Dealers определяет, кто их раздаёт. Config.Messages включает страницу «Сообщения», задаёт, сколько сообщений хранится, и первое сообщение для новых игроков.
- Agency Pay
- Config.Money.agencyPay включает или выключает Agency Pay (по умолчанию включено), указывает ресурс Agency Phone и задаёт, сколько секунд у игрока есть на подтверждение в телефоне, по умолчанию 90. Без Agency Phone на сервере корзина его не предлагает.
?Частые вопросы
Как добавить место дилера, не редактируя файл?
Откройте /ablackmarket как администратор, перейдите на страницу администратора и нажмите у дилера Добавить мою позицию, либо добавьте закладку на вкладке Закладки. Эти места сохраняются и переживают перезапуски.
Как использовать свои тексты?
Добавьте любой ключ из locales/en.lua в Config.Text, например Config.Text = { prompt_talk = 'Talk to {name}' }. Он важнее любого языкового файла и переживает обновления.