Changelog
Every drug sales release, newest first, with what it added, changed and fixed.
The server now holds each buyer and keeps every price, so a buyer deals once and a sale pays what the menu offered, and the price calculation moves into an open file.
Added
CreateSaleQuoteinserver/functions.lua: how each offer's price, quantity and total are worked out, from purity, police risk and the level's boost, open to change.DrugSoldgets the item's metadata as its last argument, so your scripts can read purity at the moment of sale.- A warning in F8 when an item listed in
Config.Metadatahas no metadata, such as a spawned one, saying why it sold at the lowest price and what to change.
Changed
- Offers are worked out and kept on the server when the menu opens, and a sale pays the kept total. See prices.
- The default weed items follow lation weed's current names, such as
ls_og_kush_bag(OG Kush Weed) in place of Plain Jane. legacySellingis gone: every sale goes through the server's hold on the buyer. Remove it from yourconfig.lua.- Only networked peds can be sold to. Peds that exist on one client only, or that a script has let go of, no longer show the prompt or fill F8 with network id warnings.
- If you kept an edited
server/functions.lua, start from the new one: the server now callsCreateSaleQuotein it.
Fixed
- The same buyer could, rarely, be sold to more than once. A buyer is now held while their menu is open and marked done after a sale, a refusal or Nevermind, using the
drugSalestate bag. - A modified client could change what a sale paid. The price is no longer taken from the client.
One table for purity pricing that works with any item, a setting for peds from other scripts, and a hook for drugs taken back from a robber.
Added
Config.Metadata: list any item from any script to price it by a number in its metadata, each with its ownkey,price_per_purityandperfect_bonus. Each weed strain, cocaine and crack can be priced apart.Config.Setup.excludeScriptPeds, on by default: only locals the game spawned can buy, as before. Turn it off to sell to peds spawned by other scripts.ItemsClaimedinserver/functions.lua, called when a player takes robbed drugs back. Empty by default.
Changed
Config.LationCoke,Config.LationMethandConfig.LationWeedare replaced byConfig.Metadata. Start from the newconfig.luaand copy your zones across.
Fixed
- A Lua error, "attempt to perform arithmetic on a nil value", with
tgiann-inventory.
Purity pricing for coke processing, and a check for the install folder.
Added
- Support for coke processing (
lation_coke): its items sell by their purity. - A console error when the
installfolder or its.sqlfile is missing.
Changed
- The update check uses the new version API.
- Links to the docs point to their new address.
Purity pricing for lation weed's version 3 items.
Added
- lation weed version 3 items sell by their purity.
Changed
- The config has the new weed item names and a new section for them.
GetPlayerInventoryinbridge/client.luachanged. If you kept an edited copy, merge in the new one.- Fewer calls to
GetData.
Fixed
- The default
rcore_dispatchalert.
Purity pricing for meth crafting, Qbox and ox_core, more logging services, and bystander calls.
Added
- Support for meth crafting (
lation_meth): its meth sells by its purity. - A new bridge with support for Qbox and
ox_core. - Logging to Fivemanage and Fivemerr.
- Bystander calls: a chance that someone reports a sale that went through, so police get more chances to catch dealers. See settings.
Changed
- The seller is frozen in place while a buyer turns them down (undone in 2.1.3).
Fixed
- Stolen items sometimes came back as a different item.
Drugs locked by level.
Added
- A
levelon each drug, so a single drug can be held back until a reputation level.
The first release of version 2.
Still stuck? Ask in our Discord: the people who write the scripts answer.
Last updated
Developers
The drug sales server and client exports, its notification event and state bag, and the open functions for prices, payouts, police counts, dispatch and sale checks.
coke processing
Requirements, install steps, items and first start for coke processing, a FiveM coke script with wild coca fields, coca growing, portable tables, purity and labs players buy.