Exports
🧩
2 Client Exports
Open or close the shop UI from any client-side script.
OpenShop
Opens a configured shop by its ID from Config.Shops. Respects job and grade restrictions.
exports['mizu_smartshop']:OpenShop('247_supermarket')Example — command trigger
RegisterCommand('openshop', function()
exports['mizu_smartshop']:OpenShop('247_supermarket')
end)Example — from another resource
-- Open the police armory from a custom interaction
exports['mizu_smartshop']:OpenShop('police_armory')ℹ️
Access Checks
OpenShop() runs the same job and grade filters as normal target/marker interaction. Players without access see a notification and the UI stays closed.
CloseShop
Closes the shop UI if it is currently open. Does nothing if no shop is active.
exports['mizu_smartshop']:CloseShop()Example
RegisterCommand('closeshop', function()
exports['mizu_smartshop']:CloseShop()
end)💡
Notes
Both exports are client-side only. OpenShop() expects a valid key from Config.Shops. Checkout is handled server-side automatically after the player confirms.
Last updated on