πŸ’΅Adding Registers

How to add registers

First Method (Preferred)

The configuration file includes an easy way for you to add registers. To get started, look for Config.Businesses. From there, each business has a section for registers. You can add as many registers as you like for each business. The data for the zones can be obtained using the PolyZone creation tool. If you do not know how to use it, take a look at the official guide.

Second Method

If you want to add registers another way, you can use following exports:

-- Opens the register for employees
exports['qb-pos']:OpenRegister("BusinessName")

-- Opens the register for customers
exports['qb-pos']:OpenCustomer("BusinessName")

Here is an example of how you might implement this in your script. Note that this is client-side.

CreateThread(function()
  exports['qb-target']:AddBoxZone("receipt-1", vector3(0, 0, 0), 1, 1, {
    name = "receipt-1",
    heading = 0,
    debugPoly = false,
    minZ = 0,
    maxZ = 0
  }, {
      options = {{
          action = function()
              exports["qb-pos"]:OpenRegister("Example")
          end,
          icon = "fas fa-credit-card",
          label = "Charge Customer",
          job = "example"
      }, {
          action = function()
              exports["qb-pos"]:OpenCustomer("Example")
          end,
          icon = "fas fa-cash-register",
          label = "Make Payment"
      }},
      distance = 2.0
  })
  -- more registers here...
end)

Last updated