📜CONFIG
You can check out default QBCore config. ESX is basically the same
Config = {
-- BASIC SETTINGS
QBCoreResource = 'qb-core',
DisableClothing = false, -- Disables clothing feature if you dont have a way to add clothing items with metadata and dont want to use core_clothing
DefaultItemSizeX = 1, -- If item size is not defined this will be used
DefaultItemSizeY = 1, -- If item size is not defined this will be used
DropShowDistance = 5.0,
DefaultDurability = 80, -- If category has durability asigned this will be the default (%)
ShootingDurabilityDegradation = 1.0, -- Higher the value faster guns will break
OpenKey = 'tab', -- The key to open inventory
CloseAfterUse = {'lockpick'}, -- Closes inventory if these items are used
SyncBackpacks = true, -- If you have a eligible backpack in your inventory it will add it on you as clothes
EnableDiscovery = true, -- Items need to be discovered with right click so they can be used (NEW)
-- 3D MODEL SETTINGS
Use3DModelAlways = false, -- 3D model is drawn in the UI intead of using a camera (Does not sync up well, scale is small)
Use3DModelInteriors = true, -- Use 3D model only in interiors when camera can glich trough walls
BlurIf3DModel = true, -- Blurs everything around if using 3D model
HeightRecognizedAsInterior = -10, -- Most shells (interiors generated by scripts) are below ground. Set height which is defined as interior
-- CAMERA SETTINGS
StartFOV = 60.0,
EndFOV = 20.0,
CameraOffsetStart = vector3(0.0, 0.8, 0.0),
CameraOffsetEnd = vector3(0.0, 6.0, 0.0), -- Offset from player while camera active
CameraTransitionTime = 400, -- Time in miliseconds it takes to transition from start to end offsets
CameraVehicleOffsetStart = vector3(-1.0,10.0,1.0),
CameraVehicleOffsetEnd = vector3(-8.0, 0.0, 1.5), -- Offset from player vehicle while camera active
VehicleCameraTransitionTime = 700, -- Time in miliseconds it takes to transition from start to end offsets
CameraTrunkOffsetStart = vector3(-0.1,0.1,3.0),
CameraTrunkOffsetEnd = vector3(-5.0, 1.0, 3.0), -- Offset from player using trunk while camera active
TrunkCameraTransitionTime = 700, -- Time in miliseconds it takes to transition from start to end offsets
-- WEAPON UI
EnableWeaponUI = true,
WeaponUIRight = 0,
WeaponUITop = 20,
-- SHOWN METADATA IN INFORMATION (NEW)
ShownMetadata = { -- Metadata that will be shown in information of the item. For example idcard will show firstname and lastname
['firstname'] = 'Firstname',
['lastname'] = 'Lastname'
},
--ITEM PROPERTIES (NEW)
ShowItemName = true, -- Shows item's name in top right corner
ShowItemCount = true,
ShowItemAmmunition = true,
-- STARTING ITEMS
SyncOldInventory = true, -- Syncs old inventory items (if there is enough space)
StartItems = {
['phone'] = {amount = 1, metadata = {}},
['bread'] = {amount = 3, metadata = {}},
['water'] = {amount = 3, metadata = {}}
},
--DEFAULT CLOTHING (NEW)
-- !!WARNING!! Make sure you have inventories created below for new clothing
-- mID: Men clothing drawable id
-- wID: Woman clothing drawable id
-- mModel: Men clothing drawable model
-- wModel: Woman clothing drawable model
-- mTexture: Men clothing drawable texture/color
-- wTexture: Woman clothing drawable texture/color
-- mTorso: Men arms (the ones that glitch trough clothes)
-- wTorso: Woman arms (the ones that glitch trough clothes)
InventoryClothing = {
['hat'] = {mID = 1, mModel = 0, mTexture = 0, wID = 1, wModel = 0, wTexture = 0},
['torso'] = {mID = 11, mModel = 15, mTexture = 0, mTorso = 15, wID = 11, wModel = 15, wTexture = 0, wTorso = 15},
['pants'] = {mID = 4, mModel = 15, mTexture = 0, wID = 4, wModel = 15, wTexture = 0},
['shoes'] = {mID = 6, mModel = 5, mTexture = 0, wID = 6, wModel = 5, wTexture = 0},
['watch'] = {mID = 7, mModel = 0, mTexture = 0, wID = 7, wModel = 0, wTexture = 0},
['tshirt'] = {mID = 8, mModel = 15, mTexture = 0, wID = 8, wModel = 5, wTexture = 0}
},
-- CATEGORIES
-- color: Sets color of items in that category
-- takeSound: Sound used when item taken
-- takePut: Sound used when item put
-- durability: If added and set to true item will have durability
-- serial: If added and set to true item will have serial code
-- stack: If added and asigned a number items in this category will stack (Infinite stacksize is 0) (NEW)
ItemCategories = {
-- WARNING! ONLY CHANGE VALUES WITHIN CATEGORY AFTER THIS LINE (DO NOT DELETE)
["backpacks"] = {
color = "#62a859",
takeSound = 'take_fabric',
putSound = 'put_fabric'
},
["cases"] = {
color = "#8330ff",
takeSound = 'take',
putSound = 'put'
},
["misc"] = {
color = "#f2f2f2",
takeSound = 'take',
putSound = 'put',
stack = 2
},
["weapons"] = {
color = "#4ac3ff",
takeSound = 'take',
putSound = 'put',
durability = true,
serial = true,
},
["component_suppressor"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["component_scope"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["component_grip"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["component_finish"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["component_flashlight"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["component_clip"] = {
color = "#f77dff",
takeSound = 'take',
putSound = 'put'
},
["pants"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
["watch"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
["hat"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
["tshirt"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
["torso"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
["shoes"] = {
color = "#ff0088",
takeSound = 'take_clothes',
putSound = 'put_clothes'
},
},
-- INVENTORY SETTINGS
-- slots: Amount of blocks/slots in inventory
-- rows: How many slots define one row
-- x: Where on screen initial inventory position is horizontally
-- y: Where on screen initial inventory position is vertically
-- alwaysSave: Saves inventory if its empty (used for saving position of inventory)
-- restrictedTo: Restricts inventory to a category of items
Inventories = {
["small_backpack"] = {
slots = 20,
rows = 5,
x = "20%",
y = "20%",
label = "BACKPACK",
alwaysSave = true,
},
["medium_bag"] = {
slots = 48,
rows = 8,
x = "20%",
y = "20%",
label = "BAG",
alwaysSave = true,
},
["large_backpack"] = {
slots = 48,
rows = 8,
x = "20%",
y = "20%",
label = "BACKPACK",
alwaysSave = true,
},
["weapon_case"] = {
slots = 80,
rows = 10,
x = "20%",
y = "20%",
label = "WEAPON CASE",
alwaysSave = true,
restrictedTo = {'weapons'}
},
["storage_case"] = {
slots = 70,
rows = 10,
x = "20%",
y = "20%",
label = "STORAGE CASE",
alwaysSave = true
},
["stash"] = {
slots = 70,
rows = 10,
x = "20%",
y = "20%",
label = "STASH",
alwaysSave = true
},
["large_backpack"] = {
slots = 48,
rows = 8,
x = "20%",
y = "20%",
label = "BACKPACK",
alwaysSave = true,
},
["small_storage"] = {
slots = 100,
rows = 10,
x = "20%",
y = "20%",
label = "STORAGE",
alwaysSave = true,
},
["big_storage"] = {
slots = 150,
rows = 10,
x = "20%",
y = "20%",
label = "STORAGE",
alwaysSave = true,
},
["weapon_storage"] = {
slots = 150,
rows = 10,
x = "20%",
y = "20%",
label = "GUN STORAGE",
alwaysSave = true,
restrictedTo = {'weapons'}
},
-- WARNING! ONLY CHANGE VALUES WITHIN CATEGORY AFTER THIS LINE (DO NOT DELETE)
["content"] = {
slots = 100,
rows = 10,
x = "20%",
y = "20%",
label = "POCKETS",
alwaysSave = true
},
["primary"] = {
slots = 10,
rows = 5,
x = "60%",
y = "20%",
label = "PRIMARY",
restrictedTo = {'weapons'},
alwaysSave = true
},
["secondry"] = {
slots = 10,
rows = 5,
x = "64%",
y = "35%",
label = "SECONDRY",
restrictedTo = {'weapons'},
alwaysSave = true
},
["hat"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "HAT",
restrictedTo = {'hat'},
alwaysSave = true
},
["tshirt"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "TSHIRT",
restrictedTo = {'tshirt'},
alwaysSave = true
},
["torso"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "TORSO",
restrictedTo = {'torso'},
alwaysSave = true
},
["pants"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "PANTS",
restrictedTo = {'pants'},
alwaysSave = true
},
["shoes"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "SHOES",
restrictedTo = {'shoes'},
alwaysSave = true
},
["watch"] = {
slots = 4,
rows = 2,
x = "50%",
y = "20%",
label = "WATCH",
restrictedTo = {'watch'},
alwaysSave = true
},
["drop"] = {
x = "60%",
y = "45%",
label = "DROP",
alwaysSave = false
},
--VEHICLE INVENTORIES
["small_trunk"] = {
slots = 50,
rows = 10,
x = "60%",
y = "45%",
label = "TRUNK",
alwaysSave = true
},
["big_trunk"] = {
slots = 100,
rows = 10,
x = "60%",
y = "45%",
label = "TRUNK",
alwaysSave = true
},
["glovebox"] = {
slots = 10,
rows = 5,
x = "60%",
y = "45%",
label = "GLOVEBOX",
alwaysSave = true
},
},
Trunks = { -- Trunk inventories for each vehicle category (Recommended to add more diversity)
[0] = 'small_trunk',
[1] = 'small_trunk',
[2] = 'big_trunk',
[3] = 'small_trunk',
[4] = 'small_trunk',
[5] = 'small_trunk',
[6] = 'small_trunk',
[7] = 'small_trunk',
[8] = 'small_trunk',
[9] = 'small_trunk',
[10] = 'big_trunk',
[11] = 'big_trunk',
[12] = 'big_trunk',
[13] = 'small_trunk',
[14] = 'small_trunk',
[15] = 'big_trunk',
[16] = 'big_trunk',
[17] = 'big_trunk',
[18] = 'big_trunk',
[19] = 'big_trunk',
[20] = 'big_trunk',
[21] = 'big_trunk'
},
ItemSell = { -- List stores with items that you can sell there
['pawnshop'] = {
coords = vector3(27.624807357788,-1345.8685302734,29.496946334839),
label = 'Pawnshop',
items = {
['goldbar'] = 500, -- Item and its sell price
['golchain'] = 50, -- Item and its sell price
['rolex'] = 1000 -- Item and its sell price
}
}
},
ItemBuy = { -- List stores with items you can buy there
['seveneleven'] = {
coords = vector3(27.624807357788,-1345.8685302734,29.496946334839),
label = 'Seven Eleven',
items = {
['snickers'] = 5, -- Item and its buy price
['water_bottle'] = 3, -- Item and its buy price
['phone'] = 500 -- Item and its buy price
}
}
},
-- INVENTORY STASHES/STORAGES
-- coords: Place of storage
-- inventory: Inventory type used! Must be existing one from Inventories above
-- jobs: jobs/gangs that can access
-- prop: Prop name that will be placed if wanted
-- personal: Inventory is individual to everyone using it (not same items for everyone)
Storage = {
['departament1'] = {
coords = vector3(474.81225585938,-994.61584472656,26.2734375),
inventory = 'big_storage',
jobs = {'police'},
prop = nil,
personal = false,
},
['departament2'] = {
coords = vector3(472.9289855957,-995.32574462891,26.2734375),
inventory = 'big_storage',
jobs = {'police'},
prop = nil,
personal = false,
},
['departament3'] = {
coords = vector3(486.92962646484,-998.24627685547,30.689805984497),
inventory = 'weapon_storage',
jobs = {'police'},
prop = nil,
personal = false,
},
['mechanic1'] = {
coords = vector3(122.34775543213,-3028.3515625,7.0408916473389),
inventory = 'big_storage',
jobs = {'mechanic'},
prop = 'prop_toolchest_05',
personal = false,
},
['mechanic2'] = {
coords = vector3(126.8946762085,-3008.6379394531,10.703436851501),
inventory = 'big_storage',
jobs = {'mechanic'},
prop = 'prop_toolchest_05',
personal = false,
},
['ambulance1'] = {
coords = vector3(306.95159912109,-601.38873291016,43.284103393555),
inventory = 'big_storage',
jobs = {'ambulance'},
prop = nil,
personal = false,
}
},
Text = {
['waypoint_set'] = 'Waypoint set!',
['item_does_not_exist'] = 'Item does not exist',
['wrong_syntax'] = 'Wrong command syntax!',
['no_space'] = 'No space left in inventory',
['no_such_item'] = 'You dont have that item',
['no_such_key'] = 'You cant use this key!',
['no_player_close'] = 'No players close',
['keybind_set'] = 'Keybind set!',
['keybinds_cleared'] = 'Keybinds cleared!',
-- UI TEXT
['inventory'] = 'INVENTORY',
['clothing'] = 'CLOTHING',
['weapons'] = 'WEAPONS',
['use'] = 'USE',
['attachments'] = 'ATTACHMENTS',
['discover'] = 'DISCOVER',
['give'] = 'GIVE',
['drop'] = 'DROP',
['info'] = 'INFO',
['keybind'] = 'KEYBIND',
['durability'] = 'DURABILITY',
['sell_it_at'] = 'SELL IT AT',
['buy_it_at'] = 'BUY IT AT',
['serial'] = 'SERIAL NUMBER',
['close'] = 'CLOSE',
-- ATTACHMENTS
['suppressor'] = 'SUPPRESSOR',
['flashlight'] = 'FLASHLIGHT',
['grip'] = 'GRIP',
['scope'] = 'SCOPE',
['finish'] = 'FINISH',
['clip'] = 'CLIP'
}
}
function SendTextMessage(msg)
--SetNotificationTextEntry('STRING')
--AddTextComponentString(msg)
--DrawNotification(0,1)
--EXAMPLE USED IN VIDEO
QBCore.Functions.Notify(msg, 'error')
end
Last updated