Configuration
Welcome to the MBT Drink Machine Configuration Guide!
MBT.Debug = falseThis variable controls whether the debug mode is enabled. When set to true, it can help you diagnose issues by providing additional debug information.
MBT.Framework = "ESX" -- ESX/QB/StandaloneThis variable determines the framework you are using in your game. It has three options: "ESX", "QB", and "Standalone". You should set this based on the framework you've integrated into your game's codebase.
MBT.ESXLegacy = true This variable is only relevant when using the ESX framework. If you are using the ESX Legacy version, set this to true; otherwise, set it to false.
MBT.Props = {`prop_vend_soda_02` --[[,`ANOTHER-PROP`]] }Here, you list the props (objects) that represent the drink machine. Each prop is represented by its model name enclosed in backticks. For example, 'prop_vend_soda_02'. You can add more props by separating them with commas.
MBT.Drinks = {
-- Adjust the price and items you wanna give, don't touch the name between []
["coke"] = { ["Price"] = 5, ["Item"] = "cola" },
}This section defines the available drinks in the machine. For each drink, you specify:
The drink's name (e.g.,
"coke").The price of the drink.
The corresponding item name that the player receives when purchasing the drink.
MBT.Language = {
--
}This is where you configure the language used in notifications and messages. You have sections for "IT" (Italian) and "EN" (English). Adjust the messages within each section to match your desired content.
MBT.HelpNotification = "Standard" -- Standard/Floating Set this variable to "Standard" for a standard notification style or "Floating" for a floating style.
MBT.Notification = function (source, text, text2) -- Put your custom notification event here
--
endThis function defines the custom notification event that is triggered when interacting with the machine. Depending on your framework, you might use different methods to show notifications. In this code, it's set up for both ESX and QB frameworks.
MBT.UseTarget = false -- Use a target script or markersSet this to true if you are using a target script or markers for interaction. If true, you should further configure the target setup in the provided AddEventHandler block.
MBT.Functions = {
--
}This section defines functions based on the selected framework. It provides a way to interact with the game's logic consistently regardless of the chosen framework.
For
"ESX","QB", and"Standalone", each framework has its set of functions like getting a player, checking their money, adding/removing items, etc.
Last updated