All resources

rsg-stores — Documentation (v3.1.0)#

Reference for server owners and developers. For installation and everyday use see README.md.

Contents#

  1. Architecture
  2. Store kinds
  3. Data formats
  4. Events and callbacks
  5. Exports
  6. Persistence
  7. Security model
  8. Database schema
  9. Server owner how-tos
  10. Troubleshooting

Architecture#

FileSideRole
shared/config.luasharedAll settings, incl. Config.OwnedStores
server/sv_database.luaserverAuto installer / non-destructive migrator (Config.AutoInstallDatabase)
server/server.luaserverCache of stores/blips/presets, buy & sell, admin events, owner management callbacks
server/sv_webhooks*.luaserverDiscord queue (purchases, sales, admin, owners, security, system)
client/client.luaclientNPC spawning, owned-store counter zones (rsg-target), shop/admin/manage NUI bridge
html/script.js + style.cssNUICustomer shop
html/admin.js + admin.cssNUI/createshop Shop Manager
html/manage.js + manage.cssNUIOwner store management

The server holds the authoritative cache (CachedNPCs). Clients get the full list on join and after admin edits (refreshNPCs, which respawns NPCs), and a light per-store update (updateShop) after stock, price, label or owner changes on owned stores. The till balance is never broadcast; it is read from the database for the owner only.

Framework APIs used: rsg-core callbacks (CreateCallback / AwaitCallback), rsg-core notify, rsg-core locales (@rsg-core/shared/locale.lua), rsg-target (addLocalEntity, addSphereZone), rsg-inventory (GetItemCount, CanAddItem, AddItem, RemoveItem). ox_lib is not used.

Store kinds#

kindPedStockMoney from salesBuy-back paid from
npcSpawned ped with targetSet by admins, may be unlimited (NULL)Removed from the economyNowhere (created), Config.SellPricePercentage
playerNone; sphere zone at the coordsOnly what the owner puts in, always limitedAdded to the store balance (till)The till, Config.OwnedStores.BuyBackPercentage

Player stores opened with the shop sign item also have prop (the sign model). Their target is the sign object (spawned within Config.DistanceSpawn) instead of a sphere zone, and the owner can pack them up.

An owned store without an owner is closed: customers see (Closed) and buy/sell events are refused.

Data formats#

Store entry (cache / client):

{
  id = 12, name = 'Bob\'s Goods', model = '', kind = 'player',      -- 'npc' | 'player'
  x = 0.0, y = 0.0, z = 0.0, h = 0.0,
  owner = { citizenid = 'ABC12345', name = 'Bob Smith' },           -- player stores only, nil = closed
  shop = { name = 'bobs_goods', label = 'Bob\'s Goods', type = 'both', -- 'both' | 'buy' | 'sell'
           items = { { name = 'bread', label = 'Bread', price = 0.5, amount = 20 } } },
}

Admin save payload (adminSaveNpc → server): as above plus, for player stores, owner = { assign = <server id or nil>, clear = <bool> }. assign must be an online player; the server resolves citizenid and character name itself. Items sent for a player store are ignored.

Owner state (callbacks → manage NUI):

{ ok = true, msg = 'text or nil', label, type, balance, items = {...},
  maxListings, maxStock, maxPrice, buyBackPct }
-- on failure: { ok = false, err = '<locale key>' }

Events and callbacks#

Server callbacks (rsg-core)#

NameArgsWhoReturns
rsg-blipmenu:server:hasAdminPerm—anyonebool
rsg-stores:server:getOnlinePlayers—admin{ {id, name, citizenid} } for the owner dropdown
rsg-blipmenu:server:saveNPCdataadminnew id or nil
rsg-stores:server:getPresets / savePreset / deletePresetsee codeadminpresets
rsg-stores:server:ownerGetStatenpcIdowner or any staff at storeowner state
rsg-stores:server:ownerAddStocknpcId, item, qty, price?owner / restockowner state (price required for a new listing)
rsg-stores:server:ownerTakeStocknpcId, item, qtyowner / takestockowner state
rsg-stores:server:ownerSetPricenpcId, item, priceowner / pricesowner state
rsg-stores:server:ownerRemoveListingnpcId, itemowner / prices + takestockowner state (stock returned to the caller)
rsg-stores:server:ownerWithdrawnpcId, amount (0 = all)owner / tillowner state. Staff are capped by DailyWithdrawLimit (error sv_staff_limit, errArgs = { left })
rsg-stores:server:ownerSetSettingsnpcId, label, typeowner / settingsowner state
rsg-stores:server:staffNearbynpcIdowner{ ok, players = { {id, name} } } within HireDistance, not already staff
rsg-stores:server:staffHirenpcId, serverId, rank, perms?ownerowner state. rank = a Config.Staff.Ranks name (its perms are used) or 'custom' with perms = { restock = true, ... }
rsg-stores:server:staffUpdatenpcId, citizenid, rank, perms?ownerowner state
rsg-stores:server:staffFirenpcId, citizenidownerowner state (works for offline staff)
rsg-stores:server:staffQuitnpcIdstaff{ ok, closed=true }
rsg-stores:server:placeSign{ x, y, z, h, label, type }player holding the sign{ ok, msg } / { ok=false, err }
rsg-stores:server:ownerPackUpnpcIdowner of a sign store{ ok, closed=true }
rsg-stores:server:ownerPickUpnpcIdowner of a sign store, AllowMove on{ ok, closed=true }
rsg-stores:server:ownerWholesalenpcId, item, qty, price?owner / wholesaleowner state. Item must be in Config.Wholesale.Items; paid per PayFrom; default price = cost × Markup
rsg-stores:server:ownerPayUpkeepnpcIdowner / upkeepowner state. Pays all owed upkeep from the till first, then cash

Owner state also carries role (owner|staff), rank (staff), perms ({ perm = bool } for the caller), permList, ranks, staffOn, maxStaff, withdrawLeft (staff with a daily limit), staff (owner only: { {cid, name, rank, perms, online} }). balance is only sent with till, ledger only with ledger, wholesale is empty without wholesale; canPackUp/canPickUp are owner only. Errors may carry errArgs for string.format.

Owner state now also carries upkeep ({ amount, owed, dueIn, evictAfter } or nil), wholesale ({ {name, label, cost} }), ledger ({ {ts, kind, item, qty, amount, who} }, kind = sale|buyback|wholesale|upkeep|withdraw) and markup.

Server net events#

EventArgsNotes
rsg-stores:server:purchaseCartnpcId, { {name, quantity} }Owned: credits till, notifies owner
rsg-stores:server:sellItemnpcId, item, qtyOwned: paid from till
rsg-stores:server:requestShopStocknpcIdLive stock
rsg-blipmenu:server:updateNPC / deleteNPCadminOwner assign/clear handled in update
rsg-blipmenu:server:evictOwnernpcId, forceadmin. Returns stock, till and sign to an online owner; force evicts an offline owner and forfeits them. Sign stores are deleted; admin stores are emptied and left unowned
rsg-blipmenu:server:saveBlip / updateBlip / deleteBlipadmin
rsg-blipmenu:server:requestNPCs / requestBlips—Initial sync

Client events#

EventArgs
rsg-blipmenu:client:refreshNPCsfull store list (respawns NPCs, rebuilds counter zones)
rsg-stores:client:updateShopnpcId, shop, owner, upkeepOwed (no respawn)
rsg-stores:client:staffStores{ npcId, ... } stores this character works at (sent on requestNPCs and whenever they're hired/fired/quit). Shows Manage Store, hides Trade
rsg-stores:client:startSignPlacement— (from the usable item; opens exports['rsg-gizmo']:Place(Config.ShopSign.Model, { rotation = 'z', snapToGround = true, maxDistance ≤ 4.0 }); confirm opens the name/type panel, Reposition reopens the gizmo at the last spot, cancel keeps the item)
rsg-blipmenu:client:refreshBlipsblip list
rsg-stores:client:transactionResult / purchaseSuccess / purchaseFailed / shopStockshop NUI updates

Exports#

ExportSideDescription
SendWebhook(channel, title, description, src, fields)serverSend a log through the rsg-stores queue

Persistence#

Everything is saved to MySQL immediately. Stock changes use atomic UPDATE ... WHERE stock >= ?, and till changes use UPDATE ... WHERE balance >= ?, so concurrent customers and the owner can't oversell or overdraw. Owned-store stock is the item rows' stock column; the till is rsg_shops_npcs.balance.

Security model#

rsg-stores checks:

  • Discounts, wholesale costs and upkeep amounts are worked out on the server from config only. Wholesale and upkeep payments are taken atomically (till) or with a checked RemoveMoney before any stock or status changes. Eviction is admin-only and permission-checked; returned stock is checked with CanAddItem, and anything that doesn't fit is listed as lost in the admin log.
  • Admin events/callbacks: RSGCore.Functions.HasPermission(src, Config.AdminPermission); denied attempts are logged to security.
  • Every trade and owner action: player exists, store exists, database loaded, player within TargetDistance + 5.0 of the store, 750 ms per-player cooldown (rate-limited trades still get a failure reply so the NUI unlocks).
  • Owner actions: the caller's citizenid must equal owner_citizenid, or be a hired staff member with the permission for that action (requireAccess(src, npcId, perm)). Callers who are neither are logged as security events; staff without the permission get sv_no_permission. The store id comes from client Lua state, never the NUI.
  • Owner-only, never staff: hire / update / fire, pack up, pick up & move. Staff can't buy from or sell to a store they work at (blocked in purchaseCart and sellItem), so prices can't be used to buy stock at $0 or drain the till by selling to the store at a high price.
  • Hiring: target must be online, a different character, within HireDistance of the owner (and the owner at the store), not already staff, under MaxStaff and MaxJobsPerPlayer. Permissions are whitelisted against the 8 keys; rank presets come from server config only. Staff rows are deleted when the store is packed up, deleted, evicted, repossessed, converted or given a new owner.
  • Staff till withdrawals: DailyWithdrawLimit is tracked per staff row (withdrawn, withdraw_day = YYYYMMDD), so restarts don't reset it.
  • Item quality: selling to any shop and stocking a shelf only count and remove stacks whose info.quality is missing or at least Config.OwnedStores.MinQuality; removal is per slot, rolled back on failure. Stops worn/spoiled items coming back out as fresh ones.
  • Picked-up (hidden) stores refuse purchases as well as sales and owner actions.
  • Sign placement: exports['rsg-gizmo']:IsPlacementValid(src, coords, 5.0) on top of the 5 m and spacing checks.
  • Sync requests (requestNPCs, requestBlips: 2 s; requestShopStock: 300 ms) are throttled per player; they only read the cache.
  • Quantities are whole numbers 1–1000; prices 0–MaxPrice, rounded to cents; labels trimmed to 100 chars; shop type whitelisted.
  • Stocking: item must exist in RSGCore.Shared.Items, not be blacklisted, unique or a weapon (metadata would be lost); the owner must hold the items and they are removed before stock is added.
  • Taking stock: CanAddItem first, stock reserved atomically, rolled back if AddItem fails. Removing a listing only deletes if the stock didn't change meanwhile.
  • Withdrawals: atomic till decrement before AddMoney('cash').
  • Shop sign: the item must be held (checked on use and again on place), it is removed before the store is created (refunded if the insert fails), the sign must be within 5 m of the player and MinSpacing from every other store, and MaxPerPlayer is enforced per citizenid.
  • Pick up & move: owner gets a Pick Up & Move Store target option on the sign (and a button on the Settings tab). Sign stores only, room for the sign is checked first. Sets packed_at; the store stays in the server cache (stock, prices, till, ledger untouched) but is left out of the NPC/blip lists sent to clients, and all trade/owner calls refuse it. Upkeep skips it. Using the sign while you have a picked-up store skips the details panel; placeSign then moves that store (new x/y/z/h, blip moved, packed_at cleared, upkeep_next pushed back by the time it was packed). It doesn't count against MaxPerPlayer twice.
  • Pack up: sign stores only, shelves must hold 0 stock, room for the sign is checked first, till paid out atomically.
  • Buy-back to owned stores: till reserved atomically before items are removed, refunded on any failure.

Other scripts must check their own permissions if they write to these tables directly, and should not hand out stock outside the owner flow.

Database schema#

Created automatically (or install/rsg-stores.sql):

rsg_shops_npcs: id, name, model, x, y, z, h, shop_name, shop_label, shop_type (both|buy|sell), store_kind (npc|player, default npc), owner_citizenid (nullable), owner_name (nullable), balance decimal(12,2) default 0, prop_model (nullable; set for shop sign stores). Indexes idx_shop_name, idx_owner.

rsg_shops_items: id, npc_id, item_name, label, price, stock (NULL = unlimited, NPC stores only).

rsg_shops_blips: id, name, sprite, color, x, y, z, associated_npc_id.

rsg_shops_presets: id, kind (model|blip), label, value.

rsg_shops_npcs also has upkeep_owed decimal(10,2) default 0 and upkeep_next int (unix time the next upkeep is due; sign stores only). packed_at int is set while a sign store is picked up (moving) and NULL otherwise.

rsg_shops_staff: id, npc_id, citizenid, name, staff_rank (rank name or custom), perms (comma list of restock,takestock,prices,wholesale,till,ledger,settings,upkeep), withdrawn decimal(12,2), withdraw_day int (YYYYMMDD), hired_at (unix). Unique uq_store_staff (npc_id, citizenid), index idx_staff_cid.

rsg_shops_ledger: id, npc_id, ts (unix), kind, item, qty, amount, who. Index idx_ledger_npc. Trimmed to Config.Ledger.Keep rows per store every 5 minutes; deleted with the store.

Server owner how-tos#

  • Sell a store to a player: take payment however your server does it, then /createshop → store → pick them in Assign Owner → Save.
  • Evict an owner: open the store and press Evict Owner twice. Stock, till and sign go back to the owner (they must be online, unless you tick Forfeit). To keep the stock and till for the next owner instead, tick Remove current owner and Save.
  • Charge rent for sign stores: set Config.ShopSign.Upkeep. The upkeep check runs every 5 minutes on the server's real clock (os.time()), so periods keep counting while the server is offline and are charged on the next start.
  • Opening hours use each client's in-game clock (rsg-weather syncs it). The check happens on the client only, because closing hours don't affect money.
  • Discounts use the player's current job (PlayerData.job.name) and gang. The server applies them to purchases and, at NPC shops, to what the shop pays when that player sells (payout = price x SellPricePercentage x (1 - discount)), so discounts can't be farmed. The client only shows them.
  • Price exploit warning: on start the server prints price exploit: <item> costs $X at <shop> but <shop> pays $Y for every item you can buy (NPC shop or wholesale) for less than another NPC shop pays. Raise the buy price or lower the sell price until it's gone.
  • Refund a till before deleting: read balance for the store in rsg_shops_npcs (also logged on delete/convert under Till lost) and pay the owner manually.
  • Stop customers selling to owned stores: the owner (or admin) sets the counter to Buy only.
  • Staff ranks: edit Config.Staff.Ranks ({ name = 'cashier', perms = { 'restock', 'till' } }) and add ui_rank_cashier to all 11 locale files. Existing staff keep the permissions they were saved with.
  • Turn staff off: Config.Staff.Enabled = false. Staff rows are kept but give no access until it's back on.
  • Turn the feature off: Config.OwnedStores.Enabled = false — owned stores lose their counter zones and owner actions are refused; data is kept.

Troubleshooting#

ProblemCause / fix
Sign doesn't appearCheck Config.ShopSign.Model; invalid models are printed in F8
Using the sign does nothingYou already own MaxPerPlayer sign stores, or Config.ShopSign.Enabled/Config.OwnedStores.Enabled is false (a notification says which)
Owned store has no targetCheck rsg-target is started before rsg-stores and Config.OwnedStores.Enabled is true
"No player with that server ID is online"The owner must be online when assigned
Owner can't stock an itemItem is blacklisted, unique or a weapon, or the shelf hit MaxStock / MaxListings
"Something changed, please try again"A customer bought stock while you removed the listing; retry
Buy-back refusedTill too low for the payout
Language not changingUse setr rsg:locale "xx"
Shopkeeper doesn't speakSome ped voices don't have every line; change the lines in Config.Speech or set Enabled = false
"Closed until the owner pays its upkeep"Owner opens Manage and presses Pay Upkeep
Wholesale tab missingConfig.Wholesale.Enabled is false or no Items exist in your shared items

Support the Project : https://rexshack.tebex.store/

Dependencies#

rsg-core, rsg-inventory, rsg-target, rsg-gizmo (shop sign placement), oxmysql. Ensure rsg-gizmo before rsg-stores.

<!-- BEGIN AUTO-REFERENCE (generated from the code; re-run the generator instead of editing by hand) -->

Technical reference#

Generated from the source of rsg-stores 3.1.2. Names, arguments and defaults below are read straight from the code.

Dependencies#

rsg-core, rsg-inventory, rsg-target, rsg-gizmo, oxmysql

Database#

Tables: rsg_shops_npcs, rsg_shops_items, rsg_shops_blips, rsg_shops_ledger, rsg_shops_staff, rsg_shops_presets.

For a manual install set Config.AutoDatabase = false and import install/example.sql / install/rsg-stores.sql once.

-- shared/config.lua
Config.AutoDatabase = true -- false = import the SQL file yourself

Configuration#

OptionDefaultNotes
Config.AdminPermission'admin'Required permission to use the Blip/NPC menu
Config.AutoInstallDatabasetrueSet to false if you prefer to import rsg-stores.sql by hand.
Config.DefaultScenario'WORLD_HUMAN_STAND_IMPATIENT'NPC scenario
Config.DistanceSpawn20.0Distance before spawning/despawning the NPC (GTA Units)
Config.FadeIntrueEnable fade in/out effect
Config.SellPricePercentage0.80Player gets 80% (20% shop fee)
Config.SellAddsStocktrueItems sold to a shop are added back to its stock (limited-stock items only)
Config.MaxShopStock100Most of any one item a shop will hold from player sales (0 = no cap)
Config.TargetDistance2.5rsg-target range; server allows +5.0 for latency
Config.AllowPushToTalkWhileOpentrueWhile NUI is open, block game controls but allow push-to-talk.
Config.PushToTalkControlstable
Config.OwnedStorestableThe owner stocks the store from their own inventory, sets prices and collects the till.
Config.Enabledtrue
Config.ZoneRadius1.2
Config.BuyBackPercentage0.80
Config.MaxListings50
Config.MaxStock500
Config.MaxPrice10000
Config.NotifyOwnertrue
Config.MinQuality75
Config.BlacklistItems{ 'dollar', 'cent', 'blood_dollar', 'blood_cent' }Items owners may not stock (money items, unique/metadata items are always refused)
Config.Stafftableremove listings - also needs takestock), wholesale, till (withdraw), ledger, settings, upkeep.
Config.MaxStaff5
Config.MaxJobsPerPlayer2
Config.HireDistance5.0
Config.DailyWithdrawLimit0
Config.RankstableThe owner can also pick "Custom" and tick permissions one by one.
Config.ShopSigntableCustomers and the owner target the sign to trade / manage.
Config.Item'shopsign'
Config.Model'p_sandwichboard02x'
Config.MaxPerPlayer1
Config.MinSpacing8.0
Config.PlaceDistance1.5
Config.DefaultType'buy'
Config.ReturnOnPackUptrue
Config.AllowMovetrueName, type, stock, prices, till and ledger are kept; upkeep is paused while picked up.
Config.Upkeep{ Enabled = true, Amount = 5.0, IntervalHours = 24, EvictAfterMissed =(stock and till forfeited, sign not returned).
Config.Blip{ Enabled = true, Sprite = 1475879922, Color = 'BLIP_MODIFIER_MP_COLOR
Config.ItemDefinitiontableAuto-registered in rsg-core if your items list doesn't have it yet
Config.Speechtable(PLAY_PED_AMBIENT_SPEECH_NATIVE). Set a line to false to skip it.
Config.Greet'WELCOME'
Config.Thanks'THANKS'
Config.Goodbye'GOODBYE_POS'
Config.Params'SPEECH_PARAMS_FORCE_NORMAL_CLEAR'
Config.OpeningHourstableOpening hours (in-game clock, 0-23). Close < Open wraps past midnight (e.g. 18 -> 2).
Config.Open7
Config.Close21
Config.Shopstable
Config.DiscountstableThe best matching discount applies; worked out on the server.
Config.MaxDiscount0.50
Config.Jobstable
Config.Gangstable
Config.WholesaletableWholesale: owners of player stores buy stock straight onto the shelf from a supplier.
Config.PayFrom'either'
Config.Markup1.5
Config.Itemstable
Config.LedgertableSales ledger shown to owners in the management panel.
Config.Keep100
Config.Show50
Config.BlipTypestableLabels are locale keys (locales/*.json), translated when the admin menu opens.
Config.NpcModelstable
Config.BlipColorstable

Exports#

Server

ExportArgumentsFile
SendWebhookchannel, title, description, src, fieldsserver/sv_webhooks.lua
-- example
local result = exports['rsg-stores']:SendWebhook(channel, title, description, src, fields)

Callbacks#

CallbackSideArgumentsFile
rsg-stores:server:getPresetsserversourceserver/server.lua
rsg-stores:server:savePresetserversource, id, dataserver/server.lua
rsg-stores:server:deletePresetserversource, idserver/server.lua
rsg-stores:server:getOnlinePlayersserversourceserver/server.lua
rsg-blipmenu:server:hasAdminPermserversourceserver/server.lua
rsg-blipmenu:server:saveNPCserversource, dataserver/server.lua
rsg-stores:server:ownerGetStateserversource, npcIdserver/server.lua
rsg-stores:server:ownerAddStockserversource, npcId, itemName, qty, priceserver/server.lua
rsg-stores:server:ownerTakeStockserversource, npcId, itemName, qtyserver/server.lua
rsg-stores:server:ownerSetPriceserversource, npcId, itemName, priceserver/server.lua
rsg-stores:server:ownerRemoveListingserversource, npcId, itemNameserver/server.lua
rsg-stores:server:ownerWithdrawserversource, npcId, amountserver/server.lua
rsg-stores:server:ownerSetSettingsserversource, npcId, label, sTypeserver/server.lua
rsg-stores:server:staffNearbyserversource, npcIdserver/server.lua
rsg-stores:server:staffHireserversource, npcId, targetId, rank, permsserver/server.lua
rsg-stores:server:staffUpdateserversource, npcId, cid, rank, permsserver/server.lua
rsg-stores:server:staffFireserversource, npcId, cidserver/server.lua
rsg-stores:server:staffQuitserversource, npcIdserver/server.lua
rsg-stores:server:placeSignserversource, dataserver/server.lua
rsg-stores:server:ownerPickUpserversource, npcIdserver/server.lua
rsg-stores:server:ownerPackUpserversource, npcIdserver/server.lua
rsg-stores:server:ownerWholesaleserversource, npcId, itemName, qty, priceserver/server.lua
rsg-stores:server:ownerPayUpkeepserversource, npcIdserver/server.lua
-- client side
RSGCore.Functions.TriggerCallback('rsg-stores:server:getPresets', function(result)
    -- use result
end)

Events#

Server events can be fired by any client, so every handler re-validates the player, the arguments and any permission, distance or cooldown on the server. Never add a reward to a handler without those checks.

EventSideArgumentsFile
rsg-stores:client:transactionResultclientsuccess, message, newMoney, updatedShopItemsclient/client.lua
rsg-stores:client:purchaseSuccessclientmessage, newMoney, updatedShopItemsclient/client.lua
rsg-stores:client:purchaseFailedclientmessage, newMoneyclient/client.lua
rsg-stores:client:shopStockclientshopItemsclient/client.lua
RSGCore:Player:SetPlayerDataclient``client/client.lua
rsg-stores:client:staffStoresclientidsclient/client.lua
rsg-stores:client:startSignPlacementclientmoveclient/client.lua
rsg-blipmenu:client:refreshNPCsclientnpcsclient/client.lua
rsg-stores:client:updateShopclientnpcId, shop, owner, upkeepOwedclient/client.lua
rsg-blipmenu:client:refreshBlipsclientblipsclient/client.lua
rsg-stores:server:sellItemservernpcId, itemName, quantityserver/server.lua
rsg-stores:server:purchaseCartservernpcId, cartItemsserver/server.lua
rsg-stores:server:requestShopStockservernpcIdserver/server.lua
rsg-blipmenu:server:saveBlipserverdataserver/server.lua
rsg-blipmenu:server:updateBlipserverblipId, dataserver/server.lua
rsg-blipmenu:server:deleteBlipserverblipIdserver/server.lua
rsg-blipmenu:server:requestBlipsserver``server/server.lua
rsg-blipmenu:server:updateNPCservernpcId, dataserver/server.lua
rsg-blipmenu:server:deleteNPCservernpcIdserver/server.lua
rsg-blipmenu:server:requestNPCsserver``server/server.lua
rsg-blipmenu:server:evictOwnerservernpcId, forceserver/server.lua
-- from a client script
TriggerServerEvent('rsg-stores:server:sellItem', npcId, itemName, quantity)
-- from a server script
TriggerClientEvent('rsg-stores:client:transactionResult', source, success, message, newMoney, updatedShopItems)

Commands#

CommandNotesFile
/createshopclient/client.lua
/storeswebhooktestserver/sv_webhooks.lua

Locales#

Language files in locales/: de, el, en, es, fr, ja, nl, pl, pt-br, ro, ru. Set the language with setr rsg:locale "en".

<!-- END AUTO-REFERENCE -->