🛠️Setup

This is a detailed setup guide for Drunk System. If you have any questions before making a purchase, you can contact us on Discord

Setting Up the Script

  1. The script is standalone in nature, and you can find the required information in the config itself

  2. You can use BreathAnalyzer with commands or as an item:

    • qb-core/shared/items.lua
      ["alcohol_tester"] = {
      	["name"] = "alcohol_tester",                                                        
      	["label"] = "Alcohol Tester",
      	["weight"] = 0,
      	["type"] = "item",
      	["image"] = "alcohol_tester.png",
      	["unique"] = false,
      	["useable"] = true,
      	["shouldClose"] = true,
      	["combinable"] = nil,
      	["description"] = ""
      },
    • ox_inventory/data/items.lua
      ['alcohol_tester'] = {
          label = 'Alcohol Tester',
          weight = 0,
          stack = true,
          close = true,
          description = ""
      },

Events and Exports

Client Sided

  1. Triggered Event when drunk level updates:

Server Sided

Example

Make your items show the drunk percentage in the drunk tester

ESX

Example of how you can increase the drunk percentage when using an item. You can implement the same logic to other items. I have shown you with the beer item under esx_optionalneeds/server/main.lua

esx_optionalneeds

QBCore

Example of how you can increase the drunk percentage when using an item. You can implement the same logic for other items or events. I've demonstrated this with the alcohol use item under qb-smallresources/client/consumables.lua

qb-smallresources

OX Inventory

Example of how you can increase the drunk percentage when using an item. You can implement the same logic for other items or events. I've demonstrated this with the beer item under ox_inventory\data\items.lua

ox_inventory

Last updated