Midnight Dev
  • Vehicle Control Menu
    • Installation
    • Configuration
      • Fuel Script
      • Restrictions to Opening Menu
      • Keybinds and Allowed Controls
      • Restricted Passenger Control
      • Refresh Time
      • Hide Headlight/Neon Controls
    • Commands, Exports, Events
  • Neon Controller
    • Installation
    • Configuration
      • Keybinds and Allowed Controls
    • Commands, Exports, Events
  • Midnight Progress Bar
  • Midnight Menu and Input (Package)
Powered by GitBook
On this page
  • SUPPORTED FRAMEWORKS
  • INSTALLATION GUIDE
  • Remove Existing Files
  • Adding the Resource to Your Server
  • All Done!
  • USER SEARCH AND SORT BY PRICE FEATURES
  • Support

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

PreviousMidnight Progress Bar

Last updated 5 months ago

Buy Here


SUPPORTED FRAMEWORKS

  • QBCore Framework

INSTALLATION GUIDE

1

Remove Existing Files

Before installing, ensure you remove any existing versions of qb-input and qb-menu. This prevents conflicts and ensures the enhanced versions work properly.

2

Adding the Resource to Your Server

  1. Download the resource from your FiveM Keymaster.

  2. Unzip the qb-input.zip and qb-menu.zip folders and place them in your server's resource folder.

  3. 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)

  4. MAKE SURE THE SCRIPTS ARE ENSURED BEFORE ANY OTHER SCRIPTS THAT RELY ON QB-INPUT AND QB-MENU

3

All Done!


USER SEARCH AND SORT BY PRICE FEATURES

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

exports['qb-menu']:openMenu(categoryMenu, Config.SortAlphabetically, true)

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.


Support

Join our Discord for support. You can create a ticket for assistance or general inquiries.

Page cover image