QBCore · ox_lib
QBCore ox_lib Menu Setup Guide
ox_lib can make a QBCore resource feel polished, but the menu layer should stay separate from the server rules. Menus guide the player; server code decides the result.
Use ox_lib for the interface layer
- Use context menus for choices, input dialogs for small forms, notifications for feedback and progress bars for timed actions.
- Keep labels, icons and option text in config so the UI is easier to edit later.
- Close menus cleanly after actions so players do not double-submit the same event.
Keep validation on the server
- When a menu option triggers an event, re-check job, grade, items, money and distance server-side.
- Do not trust a hidden menu option to protect staff-only or job-only actions.
- Return a clean failure message if the server rejects the action.
Make the resource maintainable
- Use small functions for each menu group instead of one giant client file.
- Document required ox_lib version and any extra dependencies.
- Test missing dependency, wrong job, no item and resource restart scenarios.
Use this with Stellar AI
Ask Stellar to generate the ox_lib menu, config and server event plan in one organised resource.