Midnight Menu and Input (Package)
Midnight Menu and Input is a script package to enhance your QBCore server with powerful features like search and price filtering, while having all the functionalities of their regular QB versions
Last updated
Midnight Menu and Input is a script package to enhance your QBCore server with powerful features like search and price filtering, while having all the functionalities of their regular QB versions
Last updated
QBCore Framework
Download the resource from your .
Unzip the qb-input.zip
and qb-menu.zip
folders and place them in your server's resource folder.
Ensure the scripts in your server.cfg
file by writing ensure qb-input
and qb-menu
(or make sure the script is placed in a folder that is already ensured)
MAKE SURE THE SCRIPTS ARE ENSURED BEFORE ANY OTHER SCRIPTS THAT RELY ON QB-INPUT AND QB-MENU
Unlike most basic qb-menus, our menu offers a unique feature, the ability to add a search bar and a sort by price option to make finding options easier
To set these features up, you will need to access the source code of the script that utilizes the menus exports (typically in client.lua)
In this documentation, we will use qb-vehicleshop to demonstrate the usage of these features This is the part of qb-vehicleshop that shows vehicle categories.
The following line of code is where the menu is opened
There are three paramaters passed - the options, whether or not to sort alphabetically, and whether or not to skip the first option when sorting. The midnight qb-menu openMenu export accepts two more paramaters - showSearch and showShortByAmountOption Heres how they are used: For showing vehicle categories, it would be ideal to have a search option. so we add the parameter true into the openMenu function from the export. However, vehicle categories do not have prices within them, so we will set the second parameter (which determines whether or not the sortByPrice option is shown).
For showing vehicle makes, it would be ideal to have both a search option and a sort by price options, since the individual prices do have their prices listed within them. Here, both of the extra paramaters are set to true and true, indicating that we want both a search option and a sort by price option
Note: The sort by price option will only work if the prices are listed in the TXT of the option, not the HEADER. It will also work for any numerical value, even if there are any other type of symbols or characters. However, it makes most sense to use this feature for shops and stores.
Join our for support. You can create a ticket for assistance or general inquiries.