remove loader function, ensure files through fx
This commit is contained in:
1 parent
c7eca0285b
commit
11e7015672
20 files changed
+20
-25
No files matched your search
+1
-1
@@ -21,6 +21,7 @@ server_scripts {
|
|||||||
shared_scripts {
|
shared_scripts {
|
||||||
'@ox_lib/init.lua',
|
'@ox_lib/init.lua',
|
||||||
'shared/config.lua',
|
'shared/config.lua',
|
||||||
|
'shared/DrugData/*.lua',
|
||||||
}
|
}
|
||||||
|
|
||||||
lua54 'yes'
|
lua54 'yes'
|
||||||
@@ -28,6 +29,5 @@ lua54 'yes'
|
|||||||
files {
|
files {
|
||||||
'client/**.lua',
|
'client/**.lua',
|
||||||
'server/**.lua',
|
'server/**.lua',
|
||||||
'shared/**.lua',
|
|
||||||
'locales/**.json'
|
'locales/**.json'
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['TravellingMerchant'] then return end
|
||||||
Config.Merchant = {
|
Config.Merchant = {
|
||||||
Locations = {
|
Locations = {
|
||||||
Travellingmerchant = {
|
Travellingmerchant = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['cocaine'] then return end
|
||||||
Config.Cocaine = {
|
Config.Cocaine = {
|
||||||
Locations = {
|
Locations = {
|
||||||
MakePowder = { -- size = vector3(x,y,z) x = length, y = width, z = height
|
MakePowder = { -- size = vector3(x,y,z) x = length, y = width, z = height
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['consumables'] then return end
|
||||||
local emotes = {
|
local emotes = {
|
||||||
smoke = {
|
smoke = {
|
||||||
dict = "amb@world_human_aa_smoke@male@idle_a",
|
dict = "amb@world_human_aa_smoke@male@idle_a",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
if not Config.Drugs['cornerselling'] then return end
|
||||||
|
|
||||||
Config.Cornerselling = {
|
Config.Cornerselling = {
|
||||||
noSellZones = {
|
noSellZones = {
|
||||||
{loc = vector3(445.11, -991.3, 30.69), width = 10.0, length = 10.0, height = 10.0, rot = 180.0},
|
{loc = vector3(445.11, -991.3, 30.69), width = 10.0, length = 10.0, height = 10.0, rot = 180.0},
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['crack'] then return end
|
||||||
Config.Crack = {
|
Config.Crack = {
|
||||||
Recipes = {
|
Recipes = {
|
||||||
cookcrack = {
|
cookcrack = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['deliveries'] then return end
|
||||||
Config.Deliveries = {
|
Config.Deliveries = {
|
||||||
Locations = {
|
Locations = {
|
||||||
dropOff = {
|
dropOff = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['heroin'] then return end
|
||||||
Config.Heroin = {
|
Config.Heroin = {
|
||||||
Recipes = {
|
Recipes = {
|
||||||
dryheroin = {
|
dryheroin = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['lean'] then return end
|
||||||
Config.Lean = {
|
Config.Lean = {
|
||||||
Locations = {
|
Locations = {
|
||||||
SyrupVendor = {
|
SyrupVendor = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['lsd'] then return end
|
||||||
Config.LSD = {
|
Config.LSD = {
|
||||||
Recipes = {
|
Recipes = {
|
||||||
vial = {
|
vial = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['mescaline'] then return end
|
||||||
Config.Mescaline = {
|
Config.Mescaline = {
|
||||||
Locations = {
|
Locations = {
|
||||||
DryOutMescaline = { -- where to dry out your mescaline
|
DryOutMescaline = { -- where to dry out your mescaline
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['meth'] then return end
|
||||||
Config.Meth = {
|
Config.Meth = {
|
||||||
Locations = {
|
Locations = {
|
||||||
CookMeth = {
|
CookMeth = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['oxyruns'] then return end
|
||||||
Config.Oxy = {
|
Config.Oxy = {
|
||||||
Locations = {
|
Locations = {
|
||||||
OxyPayForTruck = {
|
OxyPayForTruck = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['pharma'] then return end
|
||||||
Config.Pharma = {
|
Config.Pharma = {
|
||||||
Locations = {
|
Locations = {
|
||||||
FillPrescription = { -- where to fill out your prescription
|
FillPrescription = { -- where to fill out your prescription
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
if not Config.Drugs['shrooms'] then return end
|
||||||
Config.Shrooms ={}
|
Config.Shrooms ={}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['weed'] then return end
|
||||||
Config.Weed = {
|
Config.Weed = {
|
||||||
Locations = {
|
Locations = {
|
||||||
WeedTele = { -- where you tele out of weed
|
WeedTele = { -- where you tele out of weed
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['whippit'] then return end
|
||||||
Config.Whippit = {
|
Config.Whippit = {
|
||||||
Recipes = {
|
Recipes = {
|
||||||
cracker = {
|
cracker = {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['wholesale'] then return end
|
||||||
Config.Wholesale = {
|
Config.Wholesale = {
|
||||||
settings = {
|
settings = {
|
||||||
WholesaleQuantityBonus = 0.05, -- 5% bonus per 10 units sold (up to 20%)
|
WholesaleQuantityBonus = 0.05, -- 5% bonus per 10 units sold (up to 20%)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if not Config.Drugs['xtc'] then return end
|
||||||
Config.XTC = {
|
Config.XTC = {
|
||||||
Recipes = {
|
Recipes = {
|
||||||
raw = {
|
raw = {
|
||||||
|
|||||||
@@ -71,27 +71,3 @@ Config.Bzz = { -- if you have BZZZ props for these turn it on if you want
|
|||||||
shrooms = false,
|
shrooms = false,
|
||||||
weed = false,
|
weed = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for k, v in pairs (Config.Drugs) do
|
|
||||||
if not v then goto continue end
|
|
||||||
local resourceName = 'md-drugs'
|
|
||||||
local filePath = 'shared/DrugData/' .. k .. '.lua'
|
|
||||||
local fullScript = LoadResourceFile(resourceName, filePath)
|
|
||||||
if not fullScript then
|
|
||||||
Bridge.Prints.Error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
local chunk, err = load(fullScript, filePath, "t")
|
|
||||||
if not chunk then
|
|
||||||
Bridge.Prints.Error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local success, execErr = pcall(chunk)
|
|
||||||
if not success then
|
|
||||||
Bridge.Prints.Error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
::continue::
|
|
||||||
end
|
|
||||||
Reference in new issue
Block a user