Mack-Player Stores v6
A player-owned store system for **RedM** using **RSG-Core**. Players can purchase storefronts, stock them with items from their own inventory, set prices, manage cash registers, and sell goods to other players — all through a polished in-world NUI shop interface.
Features
Player-owned stores** — any store can be purchased and operated by a player
NUI shop interface** — customers browse and buy from a graphical storefront
Owner stocking** — owners pull items from their own inventory to stock the shelves and set the sell price per item
Cash register** — owners can check their store balance and withdraw earnings
Re-pricing** — owners can change the price of any stocked item at any time
Add Funds** — owners can deposit personal cash into store funds (e.g. to cover startup costs)
Warehouse** — each store has a private stash for additional storage
Transfer ownership** — stores can be handed to another player by Citizen ID
Robbery** — armed players can attempt to rob a store (configurable fail chance & payout)
Map blips** — all active stores appear on the map with their display name
Auto-register** — new store locations are added to the database automatically on resource start
bln_notify** notifications throughout
Debug mode** — toggle NUI console output from `config.lua`
## Dependencies
| Resource | Required |
|---|---|
| `rsg-core` | ✅ |
| `ox_lib` | ✅ |
| `oxmysql` | ✅ |
| `rsg-inventory` | ✅ |
| `bln_notify` | ✅ |
## Configuration (`config.lua`)
| Setting | Default | Description |
|---|---|---|
| `Config.AutoAddStore` | `true` | Automatically inserts new store locations into the database on startup |
| `Config.StoreBlipSprite` | `819673798` | Map blip sprite hash for store icons |
| `Config.Debug` | `false` | Enables NUI browser console debug output |
| `Config.PromptKey` | `0xF3830D8E` | Input key hash for the store interaction prompt |
| `Config.InteractDistance` | `4.0` | Distance in units to interact with a store NPC |
| `Config.RobPercentage` | `10` | Percentage of the store's cash the robber receives |
| `Config.ChanceFail` | `5` | Robbery fail chance (each point = 10%, so 5 = 50%) |
| `Config.RobTime` | `7000` | Robbery progress bar duration in ms |
| `Config.WarehouseMaxWeight` | `4000000` | Max weight of each store's warehouse stash |
| `Config.WarehouseSlots` | `48` | Max item slots of each store's warehouse stash |
| `Config.Model` | *(list)* | Pool of NPC models — one is chosen at random per store |
| `Config.Store` | *(table)* | All store locations (see below) |