2025-08-12 15:22:10 +02:00
Config = { }
2025-08-12 18:00:00 +02:00
Config.Debug = true
2025-08-12 15:22:10 +02:00
Config.RenderDistance = 30.0
Config.DefaultInteractionDistance = 2.0 -- If a vending does not provide a distance this will be used as the default
-- Help us translate!
-- You can contribute by improving existing translations or adding translations for new languages
-- https://localazy.com/p/mxc
Config.Language = " en "
2025-08-12 18:08:42 +02:00
Config.NoFramework = false -- if set to true, ignore framework dependencies; use this parameter if no framework is used (obviously the items and actual usability are not implemented without any framework)
2025-08-12 15:22:10 +02:00
Config.UseOxLibMenuIfFound = true -- set to false if you don't want to use OxLib if found
Config.Blips = true -- set to false if you don't want to see blips on the minimap
Config.Sounds = true -- by default require xSound, you can edit it in config_functions.lua
Config.Target = false -- set to true if you want to use ox-target or qb-target as interaction
Config.CustomTargetResource = " " -- if you have a custom target resource name set it here
Config.AzertyKeyboard = false -- set to true if you use azerty keyboard (default qwerty)
-- Uncomment only if you want to ovverride the default translations provided by localazy
Config.Translations = {
-- %s will be replaced with selected_product_price if a product is selected
--["vending_menu_helper"] = "Please enter the code of a product.\n%s\n~INPUT_SELECT_WEAPON~ Switch camera\n~INPUT_CELLPHONE_SELECT~ Confirm selection\n~INPUT_CELLPHONE_CANCEL~ Exit",
--["selected_product_price"] = "%s - ~g~%s$~w~ \n",
--["invalid_product"] = "~r~Invalid product.~w~",
--["selection_not_valid"] = "~r~The code that you entered is not valid, please enter a valid stand code.",
--["not_enough_money"] = "~r~You don't have enough money to buy this product.",
--["already_used"] = "~r~The vending machine is being used by another player.",
--["ox_menu_header"] = "Vending Machine",
--["ox_menu_description"] = "Select product",
--["ox_menu_currency"] = "$"
--["normal_int_vanilla"] = "Press {E} to buy something from the vending machine",
--["coffee_int_vanilla"] = "Press {E} to get a coffee from the vending machine",
--["water_int_vanilla"] = "Press {E} to get a water cup",
--["cigs_int_vanilla"] = "Press {E} to buy a pack of cigarettes",
--["normal_int_target"] = "Buy something",
--["coffee_int_target"] = "Get a coffee",
--["water_int_target"] = "Refresh your mouth"
}
-- These "objects" are used by vending machines for providing human-readable names in menus, models for items, and handling payment.
-- item_name = {
-- price = number (price of the item for payment)
-- label = string (name displayed in menus, e.g., in the ox lib menu)
-- model = string (model used to populate vending machines capable of displaying items; see snack or soda for details)
-- }
-- !! "item_name" Should match the item in your inventory exactly !!
Config.Items = {
--#region coffee
coffee = { -- Used only for payment and to give the item
price = 4
} ,
--#endregion
--#region water
water = { -- Used only for payment and to give the item
price = 0 ,
ignoreGive = true
} ,
--#endregion
--#region snack
chips_cheese = {
label = " Chips: Big Cheese " ,
model = " mxc_vend_prop_item_chips1 " ,
price = 100
} ,
chips_paprika = {
label = " Chips: Paprika " ,
model = " mxc_vend_prop_item_chips2 " ,
price = 100
} ,
chips_ribs = {
label = " Chips: Sticky Ribs " ,
model = " mxc_vend_prop_item_chips3 " ,
price = 100
} ,
chips_salt = {
label = " Chips: Salt & Sauce " ,
model = " mxc_vend_prop_item_chips4 " ,
price = 100
} ,
chips_supersalt = {
label = " Chips: Super Salt " ,
model = " mxc_vend_prop_item_chips5 " ,
price = 100
} ,
chips_habanero = {
label = " Chips: Habanero " ,
model = " mxc_vend_prop_item_chips6 " ,
price = 100
} ,
2025-08-12 16:51:54 +02:00
chocolate_captain = {
label = " Ego Chaser Schockriegel " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_chocolate1 " ,
2025-08-12 16:51:54 +02:00
price = 2
2025-08-12 15:22:10 +02:00
} ,
2025-08-12 16:51:54 +02:00
chocolate_meteorite = {
label = " EarthQuakes " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_chocolate2 " ,
2025-08-12 16:51:54 +02:00
price = 2
2025-08-12 15:22:10 +02:00
} ,
condom = {
label = " Condom: Soth Lags " ,
model = " mxc_vend_prop_item_preservatives " ,
price = 100 ,
zoffset = - 0.02
} ,
candy_zebra = {
label = " Candy: Zebrabar " ,
model = " mxc_vend_prop_item_candybar1 " ,
price = 100
} ,
candy_psqs = {
label = " Candy: P's & Q's " ,
model = " mxc_vend_prop_item_candybar2 " ,
price = 100
} ,
medicine_laxmax = {
label = " Medicine: Lax to the Max " ,
model = " mxc_vend_prop_item_medical1 " ,
price = 100
} ,
medicine_alcopatch = {
label = " Medicine: AlcoPatch " ,
model = " mxc_vend_prop_item_medical2 " ,
price = 100
} ,
medicine_mollis = {
label = " Medicine: Mollis " ,
model = " mxc_vend_prop_item_medical3 " ,
price = 100
} ,
medicine_betta = {
label = " Medicine: Betta " ,
model = " mxc_vend_prop_item_medical4 " ,
price = 100
} ,
gum_peppermint = {
label = " Gum: Peppermint " ,
model = " mxc_vend_prop_item_gum1 " ,
price = 100
} ,
gum_cinnamon = {
label = " Gum: Cinnamon " ,
model = " mxc_vend_prop_item_gum2 " ,
price = 100
} ,
gum_spearmint = {
label = " Gum: Spearmint " ,
model = " mxc_vend_prop_item_gum3 " ,
price = 100
} ,
--#endregion
--#region soda
ecola_flasche = {
label = " E-Cola " ,
model = " mxc_vend_prop_item_bottle1 " ,
price = 6
} ,
ecola_flasche = {
label = " E-Cola " ,
model = " mxc_vend_prop_item_bottle1 " ,
price = 6
} ,
bottle_junk = {
label = " Junk " ,
model = " mxc_vend_prop_item_bottle2 " ,
price = 6
} ,
orange_o_tang_flasche = {
label = " Orang Tang " ,
model = " mxc_vend_prop_item_bottle3 " ,
price = 6
} ,
orange_o_tang_zero_flaschee = {
label = " Orang Tang Zero " ,
model = " mxc_vend_prop_item_bottle3 " ,
price = 6
} ,
bottle_tonic = {
label = " Tonic " ,
model = " mxc_vend_prop_item_bottle4 " ,
price = 6
} ,
water_bottle = {
label = " Wasser " ,
model = " mxc_vend_prop_item_bottle5 " ,
price = 6
} ,
2025-08-12 15:32:09 +02:00
sprunk_flasche = {
2025-08-12 15:22:10 +02:00
label = " Sprunk " ,
model = " mxc_vend_prop_item_bottle6 " ,
price = 6
} ,
2025-08-12 15:32:09 +02:00
sprunk_zero_flasche = {
label = " Sprunk " ,
model = " mxc_vend_prop_item_bottle6 " ,
price = 6
} ,
2025-08-12 15:22:10 +02:00
ecola_dose = {
label = " E-Cola Dose " ,
model = " mxc_vend_prop_item_cansoda1 " ,
price = 4
} ,
orange_o_tang_dose = {
label = " Orange O Tang Dose " ,
model = " mxc_vend_prop_item_cansoda2 " ,
price = 4
} ,
orange_o_tang_zero_dose = {
label = " Orange O Tang Dose Zero " ,
model = " mxc_vend_prop_item_cansoda2 " ,
price = 4
} ,
junk_energy = {
label = " Junk Dose " ,
model = " mxc_vend_prop_item_cansoda3 " ,
price = 4
} ,
sprunk_dose = {
label = " Sprunk Dose " ,
model = " mxc_vend_prop_item_cansoda4 " ,
price = 4
} ,
sprunk_zero_dose = {
2025-08-12 16:51:54 +02:00
label = " Sprunk Zero Dose " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_cansoda4 " ,
price = 4
} ,
can_logger = {
2025-08-12 16:51:54 +02:00
label = " Logger dose " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_canbeer1 " ,
price = 100
} ,
can_blarneys = {
2025-08-12 16:51:54 +02:00
label = " Blarneys Dose " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_canbeer2 " ,
price = 100
} ,
can_hoplivion = {
2025-08-12 16:51:54 +02:00
label = " Hoplivion Dose " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_canbeer3 " ,
price = 100
} ,
can_cerbeza = {
2025-08-12 16:51:54 +02:00
label = " Cerbeza Dose " ,
2025-08-12 15:22:10 +02:00
model = " mxc_vend_prop_item_canbeer4 " ,
price = 100
} ,
--#endregion
--#region svapo
2025-08-12 16:51:54 +02:00
droelfbar = {
label = " Drölfbar Döner Ice Explosion " ,
2025-08-12 15:22:10 +02:00
model = " mxc_smoking_prop_evape_2a " ,
2025-08-12 16:51:54 +02:00
price = 20
2025-08-12 15:22:10 +02:00
} ,
2025-08-12 16:51:54 +02:00
droelfbar2 = {
label = " Drölfbar Pfirsich Minze Ice " ,
2025-08-12 15:22:10 +02:00
model = " mxc_smoking_prop_evape_2f " ,
2025-08-12 16:51:54 +02:00
price = 20
2025-08-12 15:22:10 +02:00
} ,
--#endregion
2025-08-12 16:51:54 +02:00
redwoodpack = {
label = " Packung Redwood Zigaretten " ,
2025-08-12 15:22:10 +02:00
model = " v_ret_ml_cigs " ,
2025-08-12 16:51:54 +02:00
price = 10
2025-08-12 15:22:10 +02:00
} ,
cigs_redwood2 = {
label = " Cigarettes: Redwood2 " ,
model = " v_ret_ml_cigs2 " ,
price = 100
} ,
cigs_debonaireb = {
label = " Cigarettes: Debonaire Blue " ,
model = " v_ret_ml_cigs3 " ,
price = 100
} ,
cigs_debonaireg = {
label = " Cigarettes: Debonaire Green " ,
model = " v_ret_ml_cigs4 " ,
price = 100
} ,
cigs_cardiaque = {
label = " Cigarettes: Cardiaque " ,
model = " v_ret_ml_cigs5 " ,
price = 100
} ,
cigs_69brand = {
label = " Cigarettes: 69Brand " ,
model = " v_ret_ml_cigs6 " ,
price = 100
} ,
cigs_cok = {
label = " Cigarettes: CoK " ,
model = " mxc_vend_prop_item_cigs1 " ,
price = 100
} ,
cigs_estancia = {
label = " Cigars: Estancia " ,
model = " prop_cigar_pack_01 " ,
price = 100
}
}
-- Here you can enter model and coordinates to spawn new vending machines around the map, the last value of the vector is the heading
2025-08-12 18:25:36 +02:00
Config.PlaceVendings = {
prop_vend_snak_01 = {
vec4 ( 0 , 0 , 0 , 0 ) ,
} ,
prop_vend_soda_01 = {
vec4 ( 0 , 0 , 0 , 0 )
} ,
2025-08-12 18:21:15 +02:00
2025-08-12 18:25:36 +02:00
}
2025-08-12 15:22:10 +02:00
-- Here you can customize the exhibition of vending machines near certain coordinates based on the name of vending
2025-08-12 18:25:36 +02:00
Config.OverrideExhibition = {
2025-08-12 15:22:10 +02:00
{
name = " snack " , -- name of vending (based on Config.Vendings)
2025-08-12 18:25:36 +02:00
coords = vec3 ( 0 , 0 , 0 ) ,
2025-08-12 15:22:10 +02:00
exhibition = {
a1 = " chips_ribs " ,
a2 = " chips_paprika " ,
a3 = " chips_paprika " ,
a4 = " chips_paprika " ,
b1 = " chips_paprika " ,
b2 = " chips_paprika " ,
b3 = " chips_paprika " ,
b4 = " chips_ribs " ,
c1 = " chips_paprika " ,
c2 = " chips_paprika " ,
c3 = " chips_paprika " ,
c4 = " chips_paprika " ,
d1 = " chips_paprika " ,
d2 = " chips_paprika " ,
d3 = " chips_paprika " ,
d4 = " chips_paprika " ,
e1 = " chips_paprika " ,
e2 = " chips_paprika " ,
e3 = " chips_paprika " ,
e4 = " chips_paprika " ,
} ,
} ,
2025-08-12 18:25:36 +02:00
}
2025-08-12 15:22:10 +02:00
-- Settings for individual vending machines, if you want to disable the blip for an individual vending machine simply delete that entire section.
Config.Vendings = {
[ " snack " ] = {
models = { ` prop_vend_snak_01 ` } ,
interaction = {
vanilla = {
notify = " normal_int_vanilla " ,
distance = 0.35
} ,
target = {
label = " normal_int_target " ,
icon = " fa-solid fa-drumstick-bite " ,
distance = 3.0
}
} ,
blip = {
sprite = 772 ,
color = 0 ,
size = 0.5
} ,
-- This section is for choosing which items (from the Config.Items list) to show for each individual stand.
-- You can follow the visual tags on the in-game model to figure out where you are putting things
exhibition = {
a1 = " chips_cheese " ,
a2 = " chips_paprika " ,
a3 = " chips_ribs " ,
a4 = " chips_salt " ,
b1 = " chips_supersalt " ,
b2 = " chips_habanero " ,
b3 = " chips_cheese " ,
b4 = " chips_paprika " ,
2025-08-12 16:51:54 +02:00
c1 = " chocolate_captain " ,
c2 = " chocolate_meteorite " ,
2025-08-12 15:22:10 +02:00
c3 = " condom " ,
c4 = " candy_zebra " ,
d1 = " candy_psqs " ,
d2 = " gum_peppermint " ,
d3 = " gum_cinnamon " ,
d4 = " gum_spearmint " ,
} ,
--#region Advanced
Near = function ( self , obj , dbId )
PopulateSnackVending ( self , obj )
end ,
Far = function ( self , obj , dbId )
ClearSnackVending ( self , obj )
end ,
OnInteraction = function ( self , obj , dbId )
local selection = nil
-- OxLib input dialog
if lib and Config.UseOxLibMenuIfFound then
selection = DisplayOxLibMenu ( self , obj )
else
selection = DisplayInteractiveMenu ( self , obj )
end
if selection then
Config.Functions . TryToBuy ( self , selection , dbId , function ( )
SelectItemSnackVending ( self , obj , selection )
end )
else
Server.SetVendingUsed ( dbId , false )
end
end
--#endregion
} ,
[ " soda " ] = {
models = { ` prop_vend_soda_01 ` } ,
interaction = {
vanilla = {
notify = " normal_int_vanilla " ,
distance = 1.0
} ,
target = {
label = " normal_int_target " ,
icon = " fa-solid fa-wine-bottle " ,
distance = 3.0
}
} ,
blip = {
sprite = 827 ,
color = 1 ,
size = 0.5
} ,
-- This section is for choosing which items (from the Config.Items list) to show for each individual stand.
-- You can follow the visual tags on the in-game model to figure out where you are putting things
exhibition = {
2025-08-12 15:44:34 +02:00
a1 = " ecola_flasche " ,
a2 = " ecola_flasche " ,
a3 = " sprunk_flasche " ,
a4 = " sprunk_flasche " ,
a5 = " orange_o_tang_flasche " ,
a6 = " orange_o_tang_flasche " ,
b1 = " ecola_zero_flasche " ,
b2 = " orange_o_tang_zero_flasche " ,
b3 = " sprunk_zero_flasche " ,
b4 = " water_bottle " ,
b5 = " water_bottle " ,
b6 = " water_bottle " ,
c1 = " sprunk_dose " ,
c2 = " ecola_dose " ,
c3 = " orange_o_tang_dose " ,
c4 = " ecola_zero_dose " ,
c5 = " sprunk_zero_dose " ,
c6 = " orange_o_tang_zero_dose " ,
2025-08-12 15:22:10 +02:00
} ,
--#region Advanced
Near = function ( self , obj , dbId )
PopulateSodaVending ( self , obj , " mxc_vend_prop_soda_shelf " )
end ,
Far = function ( self , obj , dbId )
ClearSodaVending ( self , obj )
end ,
OnInteraction = function ( self , obj , dbId )
local selection = nil
-- OxLib input dialog
if lib and Config.UseOxLibMenuIfFound then
selection = DisplayOxLibMenu ( self , obj )
else
selection = DisplayInteractiveMenu ( self , obj )
end
if selection then
Config.Functions . TryToBuy ( self , selection , dbId , function ( )
SelectItemSodaVending ( self , obj , selection )
end )
else
Server.SetVendingUsed ( dbId , false )
end
end
--#endregion
} ,
[ " coffee " ] = {
item = " coffee " , -- Vending machines without exhibition can set an item to be sold here (as always from Config.Items)
models = { ` prop_vend_coffe_01 ` } ,
interaction = {
vanilla = {
notify = " coffee_int_vanilla " ,
distance = 1.1
} ,
target = {
label = " coffee_int_target " ,
icon = " fa-solid fa-mug-hot " ,
distance = 3.0
}
} ,
blip = {
sprite = 89 ,
color = 31 ,
size = 0.5
} ,
Far = function ( self , obj , dbId )
ClearCoffeeVending ( self , obj )
end ,
--#region Advanced
OnInteraction = function ( self , obj , dbId )
Config.Functions . TryToBuy ( self , self.item , dbId , function ( )
StartCoffeeVending ( self , obj , true )
end )
end
--#endregion
} ,
[ " water " ] = {
item = " water " , -- Vending machines without exhibition can set an item to be sold here (as always from Config.Items)
models = { ` prop_watercooler ` } ,
interaction = {
vanilla = {
notify = " water_int_vanilla " ,
distance = 1.2
} ,
target = {
label = " water_int_target " ,
icon = " fa-solid fa-glass-water " ,
distance = 3.0
}
} ,
blip = {
sprite = 499 ,
color = 3 ,
size = 0.5
} ,
Far = function ( self , obj , dbId )
ClearWaterVending ( self , obj )
end ,
--#region Advanced
OnInteraction = function ( self , obj , dbId )
Config.Functions . TryToBuy ( self , self.item , dbId , function ( )
StartWaterVending ( self , obj )
Status.UpdatePlayerStatus ( { [ " thirst " ] = 20 } )
end )
end
--#endregion
} ,
[ " cigarettes " ] = {
models = { ` prop_vend_fags_01 ` } ,
interaction = {
vanilla = {
notify = " cigs_int_vanilla " ,
distance = 0.4
} ,
target = {
label = " normal_int_target " ,
icon = " fa-solid fa-smoking " ,
distance = 3.0
}
} ,
-- For this vending, this will only be used for the menu, it will not create any model
exhibition = {
2025-08-12 16:51:54 +02:00
a1 = " redwoodpack " ,
2025-08-12 15:22:10 +02:00
a2 = " cigs_redwood2 " ,
a3 = " cigs_estancia " ,
a4 = " cigs_69brand " ,
a5 = " cigs_debonaireb " ,
a6 = " cigs_debonaireg " ,
b1 = " cigs_cardiaque " ,
b2 = " cigs_cok " ,
} ,
blip = {
sprite = 205 ,
color = 22 ,
size = 0.5
} ,
--#region Advanced
OnInteraction = function ( self , obj , dbId )
local selection = nil
-- OxLib input dialog
if lib and Config.UseOxLibMenuIfFound then
selection = DisplayOxLibMenu ( self , obj )
else
selection = DisplayInteractiveMenu ( self , obj )
end
if selection then
Config.Functions . TryToBuy ( self , selection , dbId , function ( )
SelectItemCigarettesVending ( self , obj , selection )
end )
else
Server.SetVendingUsed ( dbId , false )
end
end
--#endregion
} ,
[ " soda_2 " ] = {
parent = " soda " , -- Vending machines can set a parent vending machine, this allows you to inherit all the other vending settings with the ability to override them
models = { ` prop_vend_soda_02 ` } ,
interaction = {
vanilla = {
notify = " normal_int_vanilla " ,
distance = 1.0
} ,
target = {
label = " normal_int_target " ,
icon = " fa-solid fa-wine-bottle " ,
distance = 3.0
}
} ,
blip = {
sprite = 827 ,
color = 2 ,
size = 0.5
} ,
-- This section is for choosing which items (from the Config.Items list) to show for each individual stand.
-- You can follow the visual tags on the in-game model to figure out where you are putting things
exhibition = {
a1 = " ecola_flasche " ,
a2 = " ecola_flasche " ,
a3 = " sprunk_flasche " ,
a4 = " sprunk_flasche " ,
a5 = " orange_o_tang_flasche " ,
a6 = " orange_o_tang_flasche " ,
b1 = " ecola_zero_flasche " ,
b2 = " orange_o_tang_zero_flasche " ,
b3 = " sprunk_zero_flasche " ,
b4 = " water_bottle " ,
b5 = " water_bottle " ,
b6 = " water_bottle " ,
c1 = " sprunk_dose " ,
c2 = " ecola_dose " ,
c3 = " orange_o_tang_dose " ,
c4 = " ecola_zero_dose " ,
c5 = " sprunk_zero_dose " ,
c6 = " orange_o_tang_zero_dose " ,
} ,
--#region Advanced
Near = function ( self , obj , dbId )
PopulateSodaVending ( self , obj , " mxc_vend_prop_soda_shelf2 " )
end ,
Far = function ( self , obj , dbId )
ClearSodaVending ( self , obj )
end ,
OnInteraction = function ( self , obj , dbId )
local selection = nil
-- OxLib input dialog
if lib and Config.UseOxLibMenuIfFound then
selection = DisplayOxLibMenu ( self , obj )
else
selection = DisplayInteractiveMenu ( self , obj )
end
if selection then
Config.Functions . TryToBuy ( self , selection , dbId , function ( )
SelectItemSodaVending ( self , obj , selection )
end )
else
Server.SetVendingUsed ( dbId , false )
end
end
--#endregion
} ,
-- Require cfx-mxc-smoking (https://store.markz3d.com/checkout/packages/add/6245837/single)
[ " svapo " ] = {
parent = " snack " , -- Vending machines can set a parent vending machine, this allows you to inherit all the other vending settings with the ability to override them
models = { ` mxc_vend_prop_svapo_01 ` } ,
blip = {
sprite = 772 ,
color = 0 ,
size = 0.5
} ,
exhibition = {
2025-08-12 16:51:54 +02:00
a1 = " droelfbar2 " ,
a2 = " droelfbar2 " ,
a3 = " droelfbar2 " ,
a4 = " droelfbar2 " ,
b1 = " droelfbar2 " ,
b2 = " droelfbar2 " ,
b3 = " droelfbar2 " ,
b4 = " droelfbar2 " ,
c1 = " droelfbar2 " ,
c2 = " droelfbar2 " ,
c3 = " droelfbar " ,
c4 = " droelfbar " ,
d1 = " droelfbar " ,
d2 = " droelfbar " ,
d3 = " droelfbar " ,
d4 = " droelfbar " ,
e1 = " droelfbar " ,
e2 = " droelfbar " ,
e3 = " droelfbar " ,
e4 = " droelfbar " ,
2025-08-12 15:22:10 +02:00
} ,
} ,
}