Skip to content

Setup and Items

Real setup flow, database behavior, localization, and required items for 0r-garbage-v2

This page covers the setup parts you should finish before touching scenarios: dependencies, server.cfg order, database behavior, localization, streamed assets, and required items.

Required Dependencies#

  • oxmysql
  • ox_lib
  • 0r_lib
  • Your framework: es_extended, qb-core, or qbx_core
lua
start oxmysql
start ox_lib
start framework -- es_extended, qb-core, or qbx_core
-- other resources
start 0r_lib
start 0r-garbage-v2

Database#

You do not need to import SQL manually for this script.

The real resource creates the profile table automatically in modules/mysql/server.lua:

sql
CREATE TABLE `0resmon_garbage_v2_profiles`

read-me/database.sql can still be kept as a reference file, but the script already creates the table on start.

Localization#

Language selection for this resource starts from:

lua
config/main.lua

Default source value:

lua
Config.locale = "en"

If you want another language:

  1. Change Config.locale in config/main.lua
  2. Make sure a matching locale file exists in the locales/ folder

Ready To Paste Item Tables#

If you want to install the items fast, use the blocks below directly in your inventory files.

The real source uses:

  • garbage_tablet for menu access
  • metalscrap, copper, plastic, aluminum, glass in garbageBag.openRewards
  • packed_weed, packed_meth, money, plastic, copper in container search loot

OX Inventory#

{% tabs fullWidth="false" %}

lua
--- # start 0r-garbage-v2
["garbage_tablet"] = { label = "Garbage Tablet", weight = 100, stack = false },
["metalscrap"] = { label = "Metal Scrap", weight = 100, stack = true },
["copper"] = { label = "Copper", weight = 100, stack = true },
["plastic"] = { label = "Plastic", weight = 100, stack = true },
["aluminum"] = { label = "Aluminum", weight = 100, stack = true },
["glass"] = { label = "Glass", weight = 100, stack = true },
["packed_weed"] = { label = "Packed Weed", weight = 1000, stack = true },
["packed_meth"] = { label = "Packed Meth", weight = 1000, stack = true },
["money"] = { label = "Money", weight = 0, stack = true },
--- # end 0r-garbage-v2

QB Core#

{% tabs fullWidth="false" %}

lua
garbage_tablet = { name = "garbage_tablet", label = "Garbage Tablet", weight = 100, type = "item", image = "garbage_tablet.png", unique = false, useable = true, shouldClose = false },
metalscrap = { name = "metalscrap", label = "Metal Scrap", weight = 100, type = "item", image = "metalscrap.png", unique = false, useable = false, shouldClose = false, description = "Metal Scrap" },
copper = { name = "copper", label = "Copper", weight = 100, type = "item", image = "copper.png", unique = false, useable = false, shouldClose = false, description = "Copper" },
plastic = { name = "plastic", label = "Plastic", weight = 100, type = "item", image = "plastic.png", unique = false, useable = false, shouldClose = false, description = "Plastic" },
aluminum = { name = "aluminum", label = "Aluminum", weight = 100, type = "item", image = "aluminum.png", unique = false, useable = false, shouldClose = false, description = "Aluminum" },
glass = { name = "glass", label = "Glass", weight = 100, type = "item", image = "glass.png", unique = false, useable = false, shouldClose = false, description = "Glass" },
packed_weed = { name = "packed_weed", label = "Packed Weed", weight = 1000, type = "item", image = "packed_weed.png", unique = false, useable = false, shouldClose = false, description = "Packed Weed" },
packed_meth = { name = "packed_meth", label = "Packed Meth", weight = 1000, type = "item", image = "packed_meth.png", unique = false, useable = false, shouldClose = false, description = "Packed Meth" },
money = { name = "money", label = "Money", weight = 0, type = "item", image = "money.png", unique = false, useable = false, shouldClose = false, description = "Money" },

Streamed Assets#

This resource streams default garbage bag assets and requests:

lua
stream/qua_binbags.ytyp

Do not delete the stream/ files unless you are replacing the default prop setup yourself.

Final Checklist#

  • 0r_lib starts without errors
  • 0r-garbage-v2 starts without errors
  • garbage_tablet exists if openWithItem.active = true
  • The profile table is created automatically in MySQL
  • The custom garbage bag props load in game