These are the default items and their codes, you can change them later if you want
Note : Item images in script folder
( If u use ox_inventory please convert ox_inventory item format )
OX LIB OPTION
There are many ox settings available in the files, if you want, you can configure them.
Config OX Settings
If you want to use ox_lib, please check if this link is enabled on fxmanifest.check it out from inside lua. this must be turned on before you can use ox_lib. After opening it, it will be enough to use the refresh and ensure commands.
OX Lib call
OX INVENTORY IMPORTANT STEP
If you have turned on the ox inventory feature via config and you are an ox inventory user, please perform this step
1 - Go ox_inventory/modules/items/client.lua
2 - Place the Decodes below between the other item usage codes that are in the file.
```lua
Item('merryweather_documention', function(data, slot)
local metadata = slot.metadata
if not metadata or not metadata.photourl then return end
TriggerEvent("wert-merryweather:client:use-printer-docs", metadata.photourl)
end)
Item('merryweather_idcard', function(data, slot)
local metadata = slot.metadata
if not metadata or not metadata.cardno then return end
TriggerServerEvent("wert-merryweather:server:use-idcard-item-oxinv", metadata)
end)
```
```lua
Config = {}
Config.UseTarget = true
Config.JobName = 'merryweather'
Config.NoTargetActionKey = 38 -- [E] https://docs.fivem.net/docs/game-references/controls/
Config.DebugPoly = false
Config.OxLib = true
Config.OxInventory = false
Config.OxLibProgressbar = false
Config.DiscordLog = true
Config.SocietyName = 'merryweather'
Config.ActiveBlips = true
Config.Blips = {
{
coord = vector3(569.93, -3124.12, 18.77),
sprite = 124,
color = 49,
scale = 1.0,
title = "Merryweather"
}
}
Config.Zones = {
{
action = "duty",
coord = vector3(576.38, -3126.41, 18.77),
width = 3.0,
length = 0.2,
heading = 0,
minZ = 15.77,
maxZ = 19.77,
job = Config.JobName,
label = "On / Off Duty",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-briefcase",
},
{
action = "bossmenu",
coord = vector3(573.14, -3124.17, 18.77),
width = 0.8,
length = 1.0,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Boss Menu",
icon = "fa-solid fa-clipboard"
},
{
action = "coffemachine",
coord = vector3(573.01, -3120.29, 18.77),
width = 0.6,
length = 0.4,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Coffe Machine",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-mug-hot",
},
{
action = "watermachine",
coord = vector3(576.07, -3122.96, 18.77),
width = 0.6,
length = 0.6,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Dispenser",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-droplet",
},
{
action = "vehicleshop",
coord = vector3(565.25, -3124.78, 18.77),
width = 0.8,
length = 1.0,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Vehicleshop",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-car-side",
},
{
action = "printer",
coord = vector3(563.8, -3120.53, 18.77),
width = 1.0,
length = 1.0,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Printer",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-file",
},
{
action = "stash",
coord = vector3(562.55, -3126.92, 18.77),
width = 2.2,
length = 1.4,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Stash",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-box",
},
{
action = "firstaidbox",
coord = vector3(562.05, -3123.04, 18.77),
width = 0.6,
length = 0.4,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Medical Storage",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-kit-medical",
},
{
action = "weaponshop",
coord = vector3(567.04, -3116.7, 18.77),
width = 1.2,
length = 2.2,
heading = 356,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "Weapon Storage",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-box-open",
},
{
action = "repair",
coord = vector3(581.53, -3113.11, 6.07),
width = 2.2,
length = 1.2,
heading = 0,
minZ = 5.07,
maxZ = 7.47,
job = Config.JobName,
label = "Repair Table",
icon = "fa-solid fa-toolbox",
targeticon = "fa-solid fa-wrench",
},
{
action = "idcard",
coord = vector3(571.61, -3123.73, 18.77),
width = 1.6,
length = 0.8,
heading = 0,
minZ = 15.77,
maxZ = 19.77,
job = Config.JobName,
label = "Create Security Card",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-id-card-clip",
},
{
action = "order",
coord = vector3(563.79, -3124.31, 18.77),
width = 2.0,
length = 0.8,
heading = 0,
minZ = 15.77,
maxZ = 19.77,
job = Config.JobName,
label = "Shipments",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-ship",
},
{
action = "jobs",
coord = vector3(569.67, -3127.22, 18.77),
width = 1.0,
length = 1.8,
heading = 0,
minZ = 15.77,
maxZ = 19.77,
job = Config.JobName,
label = "Jobs",
icon = "fa-solid fa-caret-right",
targeticon = "fa-regular fa-clipboard",
},
}
-- # Garages
Config.GarageActionKey = 38 -- https://docs.fivem.net/docs/game-references/controls/
Config.Garages = {
{label = "Garage A (Car)", coord = vector3(468.09, -3190.92, 6.07), size = 8.3, useZ = true, car_type = "car", spawncoord = vector4(467.87, -3179.74, 6.07, 0.45)},
{label = "Garage B (Helicopter)", coord = vector3(478.48, -3369.81, 6.07), size = 7.0, useZ = true, car_type = "helicopter", spawncoord = vector4(478.31, -3368.93, 6.07, 182.36)},
{label = "Garage C (Boat)", coord = vector3(510.1, -3301.19, 6.07), size = 10.0, useZ = true, car_type = "boat", spawncoord = vector4(521.42, -3293.73, 0.1, 184.96)},
}
Config.ImpoundGarageKey = 38 -- https://docs.fivem.net/docs/game-references/controls/
Config.ImpoundedGarages = {
{
coord = vector4(503.75, -3122.03, 6.07, 181.05),
ped_model = `s_m_m_fiboffice_01`,
size = 2.5,
useZ = true,
},
}
-- # Vehicleshop
Config.MoneyFormat = 'en-US'
Config.TestDriveTime = 60 -- Second
Config.TestDriveCoord = vector4(-1725.32, -2919.72, 13.94, 239.07)
Config.UseSocietyMoneyWhenTryBuyVehicle = true -- | if you set false it use player own money
Config.NoSocietyMoneyType = 'bank' -- | "cash"
Config.VehicleshopVehicles = {
{model = "baller5", label = "Baller Le (Armored)", price = 10000, image = "https://static.wikia.nocookie.net/gtawiki/images/6/6c/BallerLEArmored-GTAO-front.png", car_type = "car", description = "A high-end armored vehicle specially designed for Merryweather. It is a sign that being an SUV is suitable for off-road driving. It can be strengthened by customizations. It is a baller brand for 4 People."},
{model = "xls2", label = "XLS (Armored)", price = 9000, image = "https://static.wikia.nocookie.net/gtawiki/images/e/e3/XLSArmored-GTAO-front.png/revision/latest/scale-to-width-down/1000?cb=20160609145239", car_type = "car", description = "Poised delicately between BAWSAQ chic and bone-crunching utility, the Benefactor XLS is every car to everyone. Whether you're attending a board meeting halfway up a rugged cliff face or ferrying humane remains out of your place of work, it's reassuring to know the Germans have got your back. Armored version available, obviously."},
{model = "cog552", label = "Cognoscenti 55 (Armored)", price = 8500, image = "https://static.wikia.nocookie.net/gtawiki/images/b/b0/Cognoscenti55Armored-GTAO-front.png/revision/latest/scale-to-width-down/1000?cb=20160117195143", car_type = "car", description = "The original Cog Cabrio was a landmark in bringing luxury grand tourers to a wider market, which explains why every five-figure broker with a pinstripe suit and a history of sexual assault has one. Invest in this new four-door model, with more headroom and a plush interior, and you should stand out of the crowd for at least another couple of months. Armored edition available."},
{model = "cognoscenti2", label = "Cognoscenti (Armored)", price = 8000, image = "https://static.wikia.nocookie.net/gtawiki/images/3/30/CognoscentiArmored-GTAO-front.png/revision/latest/scale-to-width-down/1000?cb=20160117195043", car_type = "car", description = "The original Cog Cabrio was a landmark in bringing luxury grand tourers to a wider market, which explains why every five-figure broker with a pinstripe suit and a history of sexual assault has one. Invest in this new four-door model, with more headroom and a plush interior, and you should stand out of the crowd for at least another couple of months. This model has an extended wheelbase. Armored edition available."},
{model = "schafter5", label = "Schafter V12 (Armored)", price = 8000, image = "https://static.wikia.nocookie.net/gtawiki/images/7/7c/SchafterV12Armored-GTAO-front.png/revision/latest/scale-to-width-down/1000?cb=20151216172126", car_type = "car", description = "Powerful, understated, reliable. You have absolutely none of these qualities, so it's important to you that your car does. The new Benefactor Schafter screams corporate anonymity just as much as its predecessor, so to justify the massive price hike we've thrown in a few flourishes and a plush interior where you can screw your secretary's secretary in comfort. Armored edition available."},
{model = "mesa3", label = "Mesa 3", price = 5500, image = "https://static.wikia.nocookie.net/gtawiki/images/6/6e/Mesa3-GTAO-RGSC-Action.jpg/revision/latest?cb=20200402190614", car_type = "car", description = "Is there a more iconic and uncomfortable 4WD on the market? Every 17-years-old girl wants to lease a Canis on spring break, which is why the Mesa comes with roll cage as standard."},
{model = "dinghy", label = "Dinghy", price = 3500, image = "https://static.wikia.nocookie.net/gtawiki/images/b/b6/Dinghy-GTAV-front.png/revision/latest/scale-to-width-down/1000?cb=20170723192359", car_type = "boat", description = "If you like your dinghies like you like your prophylactics then this is the one for you. A lightweight, high capacity rigid-hulled inflatable boat that's good enough for a team of sailors on shore leave."},
{model = "maverick", label = "Maverick", price = 150000, image = "https://static.wikia.nocookie.net/gtawiki/images/2/2b/Maverick-GTAV-front.png/revision/latest/scale-to-width-down/1000?cb=20160411164524", car_type = "helicopter", description = "A two-bladed, twin-engine helicopter, the Maverick was manufactured in Canada, but you shouldn't let that put you off. Originally designed for military use, when the army rejected them for looking too 'French', they became hugely popular with rich social climbers for exactly the same reason. Used by law enforcement for surveillance operations, you'll often see them hovering above inner city African American neighborhoods. Billion candlepower spotlight and loudspeaker optional, but trust us, it's fun to play with over poor neighborhoods at night."},
}
Config.Colors = {
{gameid = 111, csscolor = "white"},
{gameid = 28, csscolor = "rgb(230, 79, 79)"},
{gameid = 91, csscolor = "rgb(216, 214, 105)"},
{gameid = 92, csscolor = "rgb(137, 224, 119)"},
{gameid = 74, csscolor = "rgb(100, 173, 207)"},
{gameid = 145, csscolor = "rgb(155, 80, 204)"},
{gameid = 3, csscolor = "gray"},
{gameid = 27, csscolor = "rgb(223, 35, 35)"},
{gameid = 38, csscolor = "rgb(204, 155, 50)"},
{gameid = 53, csscolor = "rgb(50, 192, 137)"},
{gameid = 70, csscolor = "rgb(48, 109, 179)"},
{gameid = 72, csscolor = "rgb(128, 49, 180)"},
{gameid = 0, csscolor = "black"},
{gameid = 32, csscolor = "rgb(134, 6, 6)"},
{gameid = 36, csscolor = "rgb(204, 111, 5)"},
{gameid = 50, csscolor = "rgb(4, 90, 26)"},
{gameid = 73, csscolor = "rgb(5, 55, 190)"},
{gameid = 71, csscolor = "rgb(100, 0, 167)"},
}
-- # Doors
Config.UseAddonLockScript = false
-- If you Config.UseAddonLockScript = false Config.Doors work (Script use own door lock)
Config.Doors = {
["office_door_1"] = {
hash = 100,
coord = vector3(552.247437, -3117.247803, 18.918688),
lock = true,
model = 1388116908,
},
["office_door_2"] = {
hash = 101,
coord = vector3(585.969421, -3117.247803, 18.918688),
lock = true,
model = 1388116908,
},
}
Config.AutoCloseDefaultDoors = true
Config.DoorTargets = {
{
coord = vector3(552.44, -3118.89, 18.77),
width = 0.4,
length = 1.2,
heading = 4,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "1. Door",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-door-open",
door_id = "office_door_1"
},
{
coord = vector3(585.77, -3118.89, 18.71),
width = 0.4,
length = 1.2,
heading = 0,
minZ = 17.77,
maxZ = 19.77,
job = Config.JobName,
label = "2. Door",
icon = "fa-solid fa-caret-right",
targeticon = "fa-solid fa-door-open",
door_id = "office_door_2"
},
}
-- # Disable Peds A Area
Config.DisablePedsArea = true
Config.DisablePedsAreaCoord = vector3(525.71, -3189.07, 8.68)
Config.DisablePedsAreaSize = 1000
Config.DisablePedModels = {
[`s_m_y_blackops_01`] = true,
}
Config.FriendlyRelationGroup = true
-- # Water Machine
Config.WaterMachineGiveAmount = 25 -- Thirst
Config.WaterMachineSettings = {
fill_anim = {
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
anim = "machinic_loop_mechandplayer",
flag = 16
},
water_anim = {
dict = "mp_player_intdrink",
anim = "loop_bottle",
flag = 51,
prop = "prop_mug_06",
prop_bone = 18905,
prop_coord = {x = 0.12, y = 0.008, z = 0.03},
prop_rot = {x = 240.0, y = -60.0, z = 0.0},
}
}
-- # Printer
Config.PrinterItemName = "merryweather_documention"
Config.PrinterSettings = {
print_anim = {
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
anim = "machinic_loop_mechandplayer",
flag = 16
},
}
-- # Repair
Config.RepairItemImage = "qb-inventory/html/images"
Config.MinimumQualityValueForRepair = 90
Config.RepairItems = {
["weapon_assaultrifle"] = {
image = "./images/weapon_assaultrifle.png",
item_image = "qb-inventory/html/images/weapon_assaultrifle.png",
items = {
{name = "iron", label = "IRON", amount = 13, image = "nui://qb-inventory/html/images/iron.png"},
{name = "plastic", label = "PLASTIC", amount = 4, image = "nui://qb-inventory/html/images/plastic.png"},
{name = "rubber", label = "RUBBER", amount = 8, image = "nui://qb-inventory/html/images/rubber.png"},
},
objectsettings = {
model = `w_ar_assaultrifle`,
attach_settings = {bone = 28422, posX = 0.1, posY = 0.01, posZ = 0.0, rotX = 0.0, rotY = 0.0, rotZ = 0.0}
},
animationsettings = {dict = "anim@gangops@facility@servers@", name = "hotwire", flag = 1},
},
["weapon_carbinerifle"] = {
image = "./images/weapon_carbinerifle.png",
item_image = "qb-inventory/html/images/weapon_carbinerifle.png",
items = {
{name = "iron", label = "IRON", amount = 10, image = "nui://qb-inventory/html/images/iron.png"},
{name = "plastic", label = "PLASTIC", amount = 5, image = "nui://qb-inventory/html/images/plastic.png"},
{name = "rubber", label = "RUBBER", amount = 5, image = "nui://qb-inventory/html/images/rubber.png"},
},
objectsettings = {
model = `w_ar_carbinerifle`,
attach_settings = {bone = 28422, posX = 0.1, posY = 0.01, posZ = 0.0, rotX = 0.0, rotY = 0.0, rotZ = 0.0}
},
animationsettings = {dict = "anim@gangops@facility@servers@", name = "hotwire", flag = 1},
},
["weapon_pistol"] = {
image = "./images/weapon_pistol.png",
item_image = "qb-inventory/html/images/weapon_pistol.png",
items = {
{name = "iron", label = "IRON", amount = 5, image = "nui://qb-inventory/html/images/iron.png"},
{name = "plastic", label = "PLASTIC", amount = 1, image = "nui://qb-inventory/html/images/plastic.png"},
{name = "rubber", label = "RUBBER", amount = 3, image = "nui://qb-inventory/html/images/rubber.png"},
},
objectsettings = {
model = `w_pi_pistol`,
attach_settings = {bone = 28422, posX = 0.1, posY = 0.01, posZ = 0.0, rotX = 0.0, rotY = 0.0, rotZ = 0.0}
},
animationsettings = {dict = "anim@gangops@facility@servers@", name = "hotwire", flag = 1},
},
}
-- # Coffe
Config.CoffePrepareTime = 30 -- Second
Config.CoffeGiveAmount = 25 -- Thirst
Config.CoffeItems = {
{name = "water_bottle", amount = 1},
{name = "merryweather_coffe_material", amount = 1}
}
Config.CoffeItem = "merryweather_coffe"
Config.CoffeSettings = {
drink_anim = {
dict = "mp_player_intdrink",
anim = "loop_bottle",
flag = 51,
prop = "prop_mug_06",
prop_bone = 18905,
prop_coord = {x = 0.12, y = 0.008, z = 0.03},
prop_rot = {x = 240.0, y = -60.0, z = 0.0},
}
}
-- # Image
Config.ImagePropModel = "prop_tourist_map_01"
Config.ImagePropBone = 28422
Config.ImageAnimation = {
dict = "amb@world_human_tourist_map@male@base",
anim = "base",
flag = 1,
}
-- # ID Card
Config.IdCardItemName = "merryweather_idcard"
Config.DefaultIdCardPhoto = "" -- URL
Config.CloseIDCardKey = 194
Config.IdCardPropModel = "prop_franklin_dl"
-- # Order
Config.OrderPrepareTime = 60 -- Second 10 Minute now | 600
Config.OrderOnTheWayTime = 120 -- Second 30 Minute Now | 1800
Config.OrderWaitInHarbourTime = 30 -- Second 5 Minute now | 300
Config.OrderDeliveryTime = 120 -- Second 2 minute now | 120
Config.OrderItems = {
-- Weapons
{
name = "weapon_specialcarbine",
label = "Special Carbine Rifle",
price = 1000,
image = "nui://qb-inventory/html/images/weapon_specialcarbine.png",
storage_type = "weapon"
},
{
name = "weapon_combatpdw",
label = "Combat PDW",
price = 800,
image = "nui://qb-inventory/html/images/weapon_combatpdw.png",
storage_type = "weapon"
},
{
name = "weapon_assaultshotgun",
label = "Assault Shotgun",
price = 700,
image = "nui://qb-inventory/html/images/weapon_assaultshotgun.png",
storage_type = "weapon"
},
{
name = "weapon_heavypistol", -- Item Name
label = "Heavy Pistol", -- Item Label
price = 500, -- 1 Amount Price
image = "nui://qb-inventory/html/images/weapon_heavypistol.png", -- Image URL
storage_type = "weapon" -- "weapon" | "medical"
},
{
name = "weapon_knuckle", -- Item Name
label = "Knuckle", -- Item Label
price = 300, -- 1 Amount Price
image = "nui://qb-inventory/html/images/weapon_knuckle.png", -- Image URL
storage_type = "weapon" -- "weapon" | "medical"
},
-- Ammos
{
name = "pistol_ammo",
label = "Pistol Ammo",
price = 10,
image = "nui://qb-inventory/html/images/pistol_ammo.png",
storage_type = "weapon"
},
{
name = "smg_ammo",
label = "SMG Ammo",
price = 15,
image = "nui://qb-inventory/html/images/smg_ammo.png",
storage_type = "weapon"
},
{
name = "rifle_ammo",
label = "Rifle Ammo",
price = 20,
image = "nui://qb-inventory/html/images/rifle_ammo.png",
storage_type = "weapon"
},
-- Armor
{
name = "heavyarmor",
label = "Heavy Armor",
price = 50,
image = "nui://qb-inventory/html/images/armor.png",
storage_type = "weapon"
},
-- Medical
{
name = "firstaid",
label = "First Aid",
price = 15,
image = "nui://qb-inventory/html/images/firstaid.png",
storage_type = "medical"
},
{
name = "painkillers",
label = "Painkillers",
price = 15,
image = "nui://qb-inventory/html/images/painkillers.png",
storage_type = "medical"
},
{
name = "bandage",
label = "Bandage",
price = 10,
image = "nui://qb-inventory/html/images/bandage.png",
storage_type = "medical"
},
}
-- # Progressbar Times
Config.ProgressbarTimes = {
water_fill = 5000,
water_drink = 5000,
printer = 5000,
coffe_drink = 5000,
repair_weapon = 10000,
money_transfer_take_bag = 3500,
money_transfer_deliver_bag = 2500,
}
```
local QBCore = exports['qb-core']:GetCoreObject()
-- # Functions
function Draw2DText(content, font, colour, scale, x, y)
SetTextFont(font)
SetTextScale(scale, scale)
SetTextColour(colour[1],colour[2],colour[3], 255)
SetTextEntry("STRING")
SetTextDropShadow(0, 0, 0, 0,255)
SetTextDropShadow()
SetTextEdge(4, 0, 0, 0, 255)
SetTextOutline()
AddTextComponentString(content)
DrawText(x, y)
end
function CustomNotif(text, style, time)
QBCore.Functions.Notify(text, style, time)
end
function ShowTextUI(text)
if Config.OxLib then
lib.showTextUI(text, {position = 'left-center'})
else
exports['qb-core']:DrawText(text, 'left')
end
end
function HideTextUI()
if Config.OxLib then
lib.hideTextUI()
else
exports['qb-core']:HideText()
end
end
function SetFuelAddonExport(vehicle, fuel)
-- If you use another fuel system you can edit here
if GetResourceState('LegacyFuel') == 'started' then exports['LegacyFuel']:SetFuel(vehicle, fuel) end
end
function GetFuelAddonExport(vehicle)
-- If you use another fuel system you can edit here
if GetResourceState('LegacyFuel') == 'started' then
local totalFuel = exports['LegacyFuel']:GetFuel(vehicle)
return totalFuel
else return 100 end
end
function CustomTargetAddBoxZone(data, options)
exports["qb-target"]:AddBoxZone(data.name, data.coord, data.sizeA, data.sizeB, {
name = data.name,
heading = data.heading,
debugPoly = Config.DebugPoly,
minZ = data.minZ,
maxZ = data.maxZ
}, {
options = options,
distance = 1.5
})
end
function TakePhoto(hook, cb)
if GetResourceState('screenshot-basic') == 'started' then
hook = tostring(hook)
if hook then
exports['screenshot-basic']:requestScreenshotUpload(tostring(hook), "files[]", function(data)
local image = json.decode(data)
local url = image.attachments[1].proxy_url
cb(url)
end)
else cb("") end
else cb("") end
end
function LoadDoorTargets()
for i=1, #Config.DoorTargets do
local row = Config.DoorTargets[i]
local name = row.door_id .. "_MerryweatherDoor_" .. i
exports["qb-target"]:AddBoxZone(name, row.coord, row.width, row.length, {
name = name,
heading = row.heading,
debugPoly = Config.DebugPoly,
minZ = row.minZ,
maxZ = row.maxZ
}, {
options = {
{
type = "client",
event = "wert-merryweather:client:door-action",
icon = row.icon,
label = row.label,
job = row.job,
targeticon = row.targeticon,
door_id = row.door_id
},
},
distance = 1.5
})
end
end
function CustomOxProgressBar(data)
return lib.progressCircle(data)
end
-- # Events
RegisterNetEvent('wert-merryweather:client:notif', function(text, style, time)
CustomNotif(text, style, time)
end)
RegisterNetEvent('wert-merryweather:client:stash', function()
if Config.OxInventory then
local ox_inventory = exports.ox_inventory
ox_inventory:openInventory('stash', 'MerryweatherStash_1')
else
TriggerEvent("inventory:client:SetCurrentStash", "MerryweatherStash_1")
TriggerServerEvent("inventory:server:OpenInventory", "stash", "MerryweatherStash_1", {
maxweight = 2000000,
slots = 40,
})
end
end)
RegisterNetEvent('wert-merryweather:client:custom-status', function(status, amount)
local pdata = QBCore.Functions.GetPlayerData()
if status == "thirst" then
TriggerServerEvent("QBCore:Server:SetMetaData", "thirst", pdata.metadata.thirst + amount)
elseif status == "hunger" then
TriggerServerEvent("QBCore:Server:SetMetaData", "hunger", pdata.metadata.hunger + amount)
end
end)
RegisterNetEvent('wert-merryweather:client:give-keys-addon', function(vehicle, plate)
TriggerEvent("vehiclekeys:client:SetOwner", plate)
end)
RegisterNetEvent('wert-merryweather:client:bossmenu', function()
-- If you use any different bossmenu change open event here
TriggerEvent('qb-bossmenu:client:OpenMenu') -- qb-management
end)
RegisterNetEvent('wert-merryweather:client:custom-door-event', function(id, state)
-- You need edit for your door script
end)
local QBCore = exports['qb-core']:GetCoreObject()
local WEBHOOK = ""
local DiscordLogWebhook = ""
SecurityCards = {}
if Config.OxInventory then
local ox_inventory = exports.ox_inventory
local stash = {
id = 'MerryweatherStash_1',
label = 'MerryweatherStash 1',
slots = 40,
weight = 2000000,
}
ox_inventory:RegisterStash(stash.id, stash.label, stash.slots, stash.weight)
end
function GetSocietyMoney()
local amount = exports['qb-management']:GetAccount(Config.SocietyName)
return amount or 0
end
function RemoveSocietyMoney(amount)
exports['qb-management']:RemoveMoney(Config.SocietyName, amount)
end
function AddSocietyMoney(amount)
exports['qb-management']:AddMoney(Config.SocietyName, amount)
end
-- If your Config.DiscordLog = true | Discord log work
function DiscordLog(title, message)
local embedData = {
{
['title'] = title,
['color'] = '65280',
['footer'] = {
['text'] = os.date('%c'),
},
['description'] = message,
['author'] = {
['name'] = LANG.discord_bot_name,
['icon_url'] = 'your_url.png',
},
}
}
PerformHttpRequest(DiscordLogWebhook, function() end, 'POST', json.encode({ username = LANG.discord_bot_name, embeds = embedData}), { ['Content-Type'] = 'application/json' })
end
-- # Events
RegisterNetEvent('wert-merryweather:server:printed', function(url)
local src = source
local ply = QBCore.Functions.GetPlayer(src)
if not ply then return end
local info = {}
info.photourl = url
ply.Functions.AddItem(Config.PrinterItemName, 1, false, info)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[Config.PrinterItemName], 'add')
end)
RegisterNetEvent('wert-merryweather:server:repair-weapon', function(name, slot)
local src = source
local ply = QBCore.Functions.GetPlayer(src)
if not ply then return end
if Config.OxInventory then
exports.ox_inventory:SetDurability(src, slot, 100)
else
local WeaponSlot = ply.PlayerData.items[slot]
if not WeaponSlot then return end
if WeaponSlot.info then
WeaponSlot.info.quality = 100
else
WeaponSlot.info = {}
WeaponSlot.info.quality = 100
end
ply.Functions.SetInventory(ply.PlayerData.items, true)
end
end)
-- # Callbacks
QBCore.Functions.CreateCallback("wert-merryweather:server:photo-webhook", function(source, cb)
cb(WEBHOOK)
end)
-- # Items
QBCore.Functions.CreateUseableItem(Config.CoffeItem , function(source, item)
TriggerClientEvent("wert-merryweather:client:use-coffe-item", source)
end)
if not Config.OxInventory then
QBCore.Functions.CreateUseableItem(Config.PrinterItemName, function(source, item)
if item and item.info and item.info.photourl then
TriggerClientEvent("wert-merryweather:client:use-printer-docs", source, item.info.photourl)
else
print("Documention Data Not Found!")
end
end)
QBCore.Functions.CreateUseableItem(Config.IdCardItemName, function(source, item)
if item and item.info and item.info.cardno then
if SecurityCards[item.info.cardno] then
TriggerClientEvent("wert-merryweather:client:use-idcard", source, item.info)
else
TriggerClientEvent('wert-merryweather:client:notif', source, LANG.security_card_not_active, "error")
end
end
end)
else
RegisterNetEvent('wert-merryweather:server:use-idcard-item-oxinv', function(info)
local src = source
if SecurityCards[info.cardno] then
TriggerClientEvent("wert-merryweather:client:use-idcard", src, info)
else
TriggerClientEvent('wert-merryweather:client:notif', src, LANG.security_card_not_active, "error")
end
end)
-- Make This Steps For Add in your useable list
-- Go This location ox_inventory/modules/items/client.lua
-- Add this codes
--[[ Item('merryweather_documention', function(data, slot)
local metadata = slot.metadata
if not metadata or not metadata.photourl then return end
TriggerEvent("wert-merryweather:client:use-printer-docs", metadata.photourl)
end)
Item('merryweather_idcard', function(data, slot)
local metadata = slot.metadata
if not metadata or not metadata.cardno then return end
TriggerServerEvent("wert-merryweather:server:use-idcard-item-oxinv", metadata)
end) ]]
end