🛠️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
The script is standalone in nature, and you can find the required information in the config itself
You can use BreathAnalyzer with commands or as an item:
- qb-core/shared/items.lua
- ox_inventory/data/items.lua
Events and Exports
Client Sided
- Open UI
- Close UI
Triggered Event when drunk level updates:
- Check If Player is Drunk
- Get Player Drunk Value
- Set Player Drunk Value
- Add Player Drunk Value
- Remove Player Drunk Value
Server Sided
- Get Player Drunk Value
- Set Player Drunk Value
- Add Player Drunk Value
- Remove Player Drunk Value
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
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
Last updated