Price
UnknownA script by MarKz
Price
UnknownExperience a new and immersive Vaping System like never before.
Config = {}
Config.Debug = false
-- set to true if you want to use ox-target or qb-target as interaction
Config.Target = true
-- if you have a custom target resource name set it here
Config.CustomTargetResource = ""
Config.CheckItems = true -- Check if items are available in your inventory (do not disable if you do not know what you are doing)
-- Help us translate!
-- You can contribute by improving existing translations or adding translations for new languages
-- https://localazy.com/p/mxc
Config.Language = "en"
-- Uncomment only if you want to ovverride the default translations provided by localazy
Config.Translations = {
--["to-exit"] = "Exit",
--["to-cancel"] = "Cancel",
--["to-confirm"] = "Assemble",
--["unmount"] = "Unmount",
--["choose"] = "Choose",
--["craft"] = "Assemble Vape",
--["vaping"] = "Vape",
--["terminated"] = "Liquid is terminated",
--["no-boxes"] = "You don't have any boxes",
--["no-atoms"] = "You don't have any atomizers",
--["no-boxes-and-atoms"] = "You don't have any boxes and atomizers",
--["liquid-insertion"] = "You have used %s",
--["liquid-percentage"] = "Liquid percentage",
--["stop-vaping"] = "Stop vaping",
--["make-circles"] = "Create circles",
}
--- This is the smoking job name. Put `nil` if you don't want it
Config.SmokingJob = nil
--- If true you must have a liquid in your vape, else in absence of liquid the smoke will be white
Config.EnableSmokeTracking = true
Config.SmokeKeybind = 74 -- H key
--- Keybind used for removing the vape from the hand without reusing it
Config.PutAwayVapeKeybind = 73 -- X key
--- Keybind used for creating circles with the smoke
Config.MakeCirclesKeybind = 38 -- E key
---Vape item. This is the result of crafting using _evapebox
Config.VapeItem1 = "evape1"
---Vape item. This is the result of crafting using _smokebox
Config.VapeItem2 = "evape2"
--[[
If "" you will disable the vape suitcase item
Suitcase where you can put your vapes.
- This is supported in ox and qs-advancedinventory natively.
- You can use the container item also in qb-core and you don't have to do nothing.
- For ox you don't have to do nothing.
- For quasar you need to add this: in @qs-inventory/confing/storage.lua, where you can also see an example
['name'] = "vapesuitcase", -- The unique name/identifier of the container item.
['label'] = "Vape Suitecase", -- The display name of the container in the inventory.
['weight'] = 1000, -- The maximum weight that this container can hold. Set this lower than the container's weight to prevent self-nesting.
['slots'] = 45, -- The number of inventory slots available within the container. This limits how many different item types can fit.
['items'] = {} -- Defines the default contents of the container when created or opened.
]]
Config.VapeSuitcase = "vapesuitcase"
--[[
["location-id"] = {
-- You can add more desks
CraftingDesks = {
{
position : where is the target for the crafting,
}
},
Blip = {
enable : enable the blip on map
name : blip name
position : blip position
sprite : blip sprite
color : blip color
scale : blip scale
}
}
]]
Config.Locations = {
["1-SouthLS"] = {
CraftingDesks = {
{
position = vec4(439.772247, -1888.73145, 27.01402-0.065, 128.02),
},
{
position = vec4(434.9005, -1889.16284, 27.0135517-0.065, -141.98),
},
},
Blip = {
enable = true,
name = "SmoKing",
position = vec3(436.0428, -1887.7928, 26.9751),
sprite = 671,
color = 17,
scale = 0.8,
}
},
["2-Vinewood"] = {
CraftingDesks = {
{
position = vec4(-502.7968, 287.899628, 83.3549652-0.065, -95.00),
},
{
position = vec4(-498.9427, 284.8909, 83.35496-0.065, -5.0),
},
},
Blip = {
enable = true,
name = "SmoKing",
position = vec3(-500.5951, 284.7916, 83.3160),
sprite = 671,
color = 17,
scale = 0.8,
}
},
["3-ChumashPlaza"] = {
CraftingDesks = {
{
position = vec4(-3180.35986, 1068.58142, 20.8785515-0.065, -23.44),
},
{
position = vec4(-3176.28027, 1071.27869, 20.8785515-0.065, 66.56),
},
},
Blip = {
enable = true,
name = "SmoKing",
position = vec3(-3176.38, 1069.32, 21.13),
sprite = 671,
color = 17,
scale = 0.8,
}
}
}
--- These are boxes and atomizer used for crafting `Config.VapeItem`
--[[
["item-name"] = {
prop : prop_name !! DO NOT CHANGE prop_name !!
}
]]
Config.CraftableVapes = {
--- Boxes
["sand_evapebox"] = {
prop = "mxc_smoking_prop_evape_2a" -- DO NOT CHANGE THIS
},
["black_evapebox"] = {
prop = "mxc_smoking_prop_evape_2b" -- DO NOT CHANGE THIS
},
["redblack_evapebox"] = {
prop = "mxc_smoking_prop_evape_2c" -- DO NOT CHANGE THIS
},
["cyan_evapebox"] = {
prop = "mxc_smoking_prop_evape_2d" -- DO NOT CHANGE THIS
},
["redwhite_evapebox"] = {
prop = "mxc_smoking_prop_evape_2e" -- DO NOT CHANGE THIS
},
["grey_evapebox"] = {
prop = "mxc_smoking_prop_evape_2f" -- DO NOT CHANGE THIS
},
["blue_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1a" -- DO NOT CHANGE THIS
},
["red_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1b" -- DO NOT CHANGE THIS
},
["green_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1c" -- DO NOT CHANGE THIS
},
["pink_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1d" -- DO NOT CHANGE THIS
},
["lightblue_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1e" -- DO NOT CHANGE THIS
},
["black_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1f" -- DO NOT CHANGE THIS
},
["orange_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1g" -- DO NOT CHANGE THIS
},
["yellow_smokebox"] = {
prop = "mxc_smoking_prop_smoke_1h" -- DO NOT CHANGE THIS
},
-- Atomizers
["silver_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1a" -- DO NOT CHANGE THIS
},
["red_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1b" -- DO NOT CHANGE THIS
},
["blue_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1c" -- DO NOT CHANGE THIS
},
["green_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1d" -- DO NOT CHANGE THIS
},
["pink_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1e" -- DO NOT CHANGE THIS
},
["grey_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1f" -- DO NOT CHANGE THIS
},
["black_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1g" -- DO NOT CHANGE THIS
},
["orange_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1h" -- DO NOT CHANGE THIS
},
["yellow_longatomizer"] = {
prop = "mxc_smoking_prop_atom_1i" -- DO NOT CHANGE THIS
},
-- 2
["silver_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2a" -- DO NOT CHANGE THIS
},
["red_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2b" -- DO NOT CHANGE THIS
},
["blue_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2c" -- DO NOT CHANGE THIS
},
["green_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2d" -- DO NOT CHANGE THIS
},
["pink_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2e" -- DO NOT CHANGE THIS
},
["grey_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2f" -- DO NOT CHANGE THIS
},
["black_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2g" -- DO NOT CHANGE THIS
},
["orange_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2h" -- DO NOT CHANGE THIS
},
["yellow_shortatomizer"] = {
prop = "mxc_smoking_prop_atom_2i" -- DO NOT CHANGE THIS
},
-- 3
["silver_notankatomizer"] = {
prop = "mxc_smoking_prop_atom_3a" -- DO NOT CHANGE THIS
},
["gold_notankatomizer"] = {
prop = "mxc_smoking_prop_atom_3b" -- DO NOT CHANGE THIS
},
["black_notankatomizer"] = {
prop = "mxc_smoking_prop_atom_3c" -- DO NOT CHANGE THIS
},
["red_notankatomizer"] = {
prop = "mxc_smoking_prop_atom_3d" -- DO NOT CHANGE THIS
},
}
--[[
Here you can set the power for each box of your vape. Higher values of power bigger size of smokes
]]
Config.SmokePower = {
["evape1"] = {
power = 250,
},
["evape2"] = {
power = 200,
},
["stickevape"] = {
power = 140,
},
["sumovape"] = {
power = 100,
},
["vaporglowvape"] = {
power = 120,
}
}
-- These are the liquids that can be applied to all vapes
--[[
["item-name"] = {
puffs : If Config.EnableSmokeTracking it's true, after `puffs` puffs you will finish the liquid
}
]]
Config.Liquids = {
["liquid_sweettemptation"] = {
puffs = 50,
},
["liquid_iceberg"] = {
puffs = 50,
},
["liquid_snoopify"] = {
puffs = 50,
},
["liquid_goldtobacco"] = {
puffs = 50,
},
["liquid_fruitytrip"] = {
puffs = 50,
},
["liquid_candybomb"] = {
puffs = 50,
},
["liquid_blueberry"] = {
puffs = 50,
},
}
--- These are all-in-one vapes (not craftable)
--[[
["item-name"] = {
prop : prop_name ! DO NOT CHANGE THIS
}
]]
Config.SimpleVapes = {
["blue_stickevape"] = {
prop = "mxc_smoking_prop_evape_1a", -- DO NOT CHANGE THIS
},
["red_stickevape"] = {
prop = "mxc_smoking_prop_evape_1b", -- DO NOT CHANGE THIS
},
["green_stickevape"] = {
prop = "mxc_smoking_prop_evape_1c", -- DO NOT CHANGE THIS
},
["pink_stickevape"] = {
prop = "mxc_smoking_prop_evape_1d", -- DO NOT CHANGE THIS
},
["lightgrey_stickevape"] = {
prop = "mxc_smoking_prop_evape_1e", -- DO NOT CHANGE THIS
},
["black_stickevape"] = {
prop = "mxc_smoking_prop_evape_1f", -- DO NOT CHANGE THIS
},
["orange_stickevape"] = {
prop = "mxc_smoking_prop_evape_1g", -- DO NOT CHANGE THIS
},
["yellow_stickevape"] = {
prop = "mxc_smoking_prop_evape_1h", -- DO NOT CHANGE THIS
},
-- Sumo Vape
["blue_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1a", -- DO NOT CHANGE THIS
},
["red_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1b", -- DO NOT CHANGE THIS
},
["green_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1c", -- DO NOT CHANGE THIS
},
["pink_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1d", -- DO NOT CHANGE THIS
},
["lightgrey_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1e", -- DO NOT CHANGE THIS
},
["black_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1f", -- DO NOT CHANGE THIS
},
["orange_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1g", -- DO NOT CHANGE THIS
},
["yellow_sumovape"] = {
prop = "mxc_smoking_prop_sumo_1h", -- DO NOT CHANGE THIS
},
-- VaporGlow Vape
["blue_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1a", -- DO NOT CHANGE THIS
},
["red_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1b", -- DO NOT CHANGE THIS
},
["green_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1c", -- DO NOT CHANGE THIS
},
["pink_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1d", -- DO NOT CHANGE THIS
},
["lightgrey_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1e", -- DO NOT CHANGE THIS
},
["black_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1f", -- DO NOT CHANGE THIS
},
["orange_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1g", -- DO NOT CHANGE THIS
},
["yellow_vaporglowvape"] = {
prop = "mxc_smoking_prop_vaporglow_1h", -- DO NOT CHANGE THIS
}
}
Config.Functions = {
StartFramework = function()
if GetResourceState("es_extended") ~= "missing" then
ESX = exports["es_extended"]:getSharedObject()
elseif GetResourceState("qb-core") ~= "missing" then
QBCore = exports["qb-core"]:GetCoreObject()
end
end,
--[[
You can use this if you have some weird inventory or do something when adding the item
---@param playerId any
---@param name string
---@param count number
---@param metadata table
---@param slot number
AddItem = function (playerId, name, count, metadata, slot)
end,
---@param playerId any
---@param name string
---@param count number
---@param slot number?
RemoveItem = function (playerId, name, count, slot)
end,
---@param itemName string
GetSlotsWithItem = function (itemName)
end,
-- ---Sets metadata on the specified slot
-- ---@param playerId number
-- ---@param slot number
-- ---@param metadata table
-- SetMetadata = function (playerId, slot, metadata)
-- end,
]]
--[[
-- Client side!
--- @param filter table
--- @return boolean
CustomJobCheck = function(filter)
end,
]]
--[[
TargetAddModel = function(models, options)
end,
TargetAddLocalEntity = function(entity, options)
end,
TargetRemoveLocalEntity = function(entity)
end,
]]
VapeNotification = function (message, type)
type = type and type or "info"
if ESX then
ESX.ShowNotification(message, type)
elseif QBCore then
QBCore.Functions.Notify(message, type, 5000)
end
end,
-- Function is triggered when the desk is closed
---@return any
OnDeskClose = function()
end,
-- Function is triggered when the desk is opened
---@return any
OnDeskOpen = function()
end,
---Function is triggered when you smoke the vape
---@param boxItem string box item name (e.g, sand_evapebox)
---@param atomItem string atomizer item name (e.g, blue_longatomizer)
OnSmokeEvent = function (boxItem, atomItem)
end,
---Functions is triggered when you make circles with the vape
---@param boxItem string box item name (e.g, sand_evapebox)
---@param atomItem string atomizer item name (e.g, blue_longatomizer)
OnSmokeCircleEvent = function (boxItem, atomItem)
end,
---AddItem (Server Function). This is called when finished crafting in the desk
---@param source any Player's id
---@param atomizerItem string atomizer prop name (e.g, sand_evapebox)
---@param boxItem string box prop name
---@param vapeItem string evape1 or evape2
---@param metadata table metadata table
OnFinishedCraftItem = function (source, atomizerItem, boxItem, vapeItem, metadata)
local boxLabel = GetItemLabelFromItemName(boxItem)
local atomLabel = GetItemLabelFromItemName(atomizerItem)
metadata["description"] = ("Box: %s \nAtomizer: %s"):format(boxLabel, atomLabel)
MyBridge:addItem(source, vapeItem, 1, metadata)
end,
---@class VapeMetadata
---@field boxProp string box prop name (e.g, mxc_smoking_prop_evape_2d)
---@field boxItem string box item name (e.g, cyan_evapebox)
---@field atomizerProp string atomizer prop name (e.g, mxc_smoking_prop_atom_1c)
---@field atomizerItem string atomizer item name (e.g, blue_longatomizer)
---@field liquidItem string liquid item name (e.g, liquid_candybomb)
---@field puffs number number of remaining puffs
---@field liquidPercentage number liquid percentage
---@field description string item description showed in the tooltip
---This Function is called when setting the "description" metadata field of the item (ox only), when the player puffs
---@param metadata VapeMetadata
---@return string
SetItemDescription = function (metadata)
local boxLabel = GetItemLabelFromItemName(metadata["boxItem"])
local atomLabel = GetItemLabelFromItemName(metadata["atomizerItem"])
local description = ("Box: %s \nAtomizer: %s \nLiquid Percentage: %s %%"):format(boxLabel, atomLabel, metadata["liquidPercentage"])
return description
end
}
| Code is accessible | Partially, open functions for compatibility |
| Subscription-based | No |
| Lines (approximately) | 2000+ |
| Requirements | utility_lib |
| Support | Yes |
See what others are saying about this script.
Share your experience and help others.