CAS Blackmarket is Codeaftersex’s legacy FiveM shop resource, published in 2023. The original source is mb-later/CAS-Market. The previous GitHub URL contained yourgithublink, a placeholder rather than a download. In September 2024 the creator said FiveM support had stopped.
Resource folder and configuration
Extract the inner cas-market folder into server resources and keep that exact name: the web interface hardcodes it in NUI callback URLs. Select qb or esx through CAS.Framework and check the server/server_hook.lua inventory adapter and client/client_hook.lua notification adapter against your installed resources.
Configure the catalogue, prices and the single CAS.PedCoords location. The client opens the market with E near that location. The inventoryPatch setting in html/app.js points to qb-inventory images by default; change it to your actual inventory image directory. Browser sessionStorage retains the basket; it is not evidence of a performance improvement.
Purchase handling needs correction
The inspected server accepts basket totals, quantities and payment methods from the client. It then attempts to charge the submitted basket total inside the loop for each item line. A multi-item basket can therefore be charged repeatedly instead of once. Prices and quantities need validation and a fresh total calculated from the server catalogue.
Before public use, also validate proximity and payment accounts, check that item delivery succeeds, and handle failures without losing money or duplicating items. The default cash payment label needs matching to your ESX account names. Configurable hooks alone do not make every inventory compatible.
Other limits to test
The client creates CAS.Ped but later uses a different ped variable for NPC setup. Review those references and the heading coordinate before assuming a frozen, correctly configured NPC. No resource was executed for this review: the ZIP integrity passed and the complete relevant Lua, configuration and shop JavaScript were inspected. Test NPC interaction, mixed baskets, insufficient funds and full inventories on a separate server.