Configuration
Notify
Notify = function(text, method)
Your_Notify_Script(text, method)
end
Inventory
GetItemName = function(id, item)
local itemData = exports.ox_inventory:GetItem(id, item) -- ox
local itemData = exports['qb-inventory']:GetItemByName(id, item) -- qb
return itemData and itemData.count or 0
end
CheckCapacity = function(id, name, amount)
return exports.ox_inventory:CanCarryItem(id, name, amount) -- ox
return exports['qb-inventory']:CanAddItem(id, name, amount) -- qb
end
AddItem = function(id, name, amount, meta)
exports.ox_inventory:AddItem(id, name, amount, meta) -- ox
exports['qb-inventory']:AddItem(id, name, amount, false, meta) -- qb
end
RemoveItem = function(id, name, amount)
return exports.ox_inventory:RemoveItem(id, name, amount) and true or false -- ox
return exports['qb-inventory']:RemoveItem(id, name, amount) and true or false -- qb
end
Support Another Inventory Scripts
Config
return {
debug = false,
restartingame = true,
allowedJobs = {
'ambulance'
},
-- Processing props and items
object = {
basket = {
model = 'prop_crate_03a',
item = 'farm_basket'
}
},
locale = {
action = {
key = 'E',
putbasket = 'G Put Basket',
openshop = 'Open Shop'
},
farm = {
seed = 'Start Planting',
water = 'Give a Water',
planting = 'Seedling process',
fertilizer = 'Give a Fertilizer',
pesticide = 'Give a Pesticide',
destroy = 'Destroy a Plant',
checking = 'Checking Plant'
},
notify = {
-- Plant Notify --
putseed = 'You have planted seed',
needseed = 'You don\'t have seed',
basketfull = 'The basket is full',
usedbasket = 'You are holding a basket',
nobasket = 'Take basket to continue',
nowatercan = 'You don\'t have watercan',
nofertilizer = 'You don\'t have fertilizer',
nopesticide = 'You don\'t have pesticide',
candestroy = 'You have destroyed a plant',
cantdestroy = 'You cannot destroy this plant',
safeprocess = 'Wait until all the processes are complete',
-- Shop Notify --
insufficient = 'Insufficient funds',
purchase = 'Purchase successful',
failed = 'Failed to process payment',
itemsold = 'Item sold successfully',
invfailed = 'Unable to access the inventory',
noitem = 'You don\'t have this item or invalid amount'
}
}
}
return {
-- Time settings in minutes
times = {
growth = 3,
putseed = 1,
givewater = 1,
givefertilizer = 1,
givepesticide = 1,
harvestobject = 1,
harvesting = 1,
destroying = 1
},
-- Increase values for various plant attributes
increase = {
water = 50,
fertilizer = 50,
health = 50,
growth = 50
},
-- Miscellaneous settings
others = {
closeui = true,
keydrop = 58,
harvestamount = 5,
groundproperly = true,
propfix = true,
autodestroy = false
},
-- Processing props and items
processing = {
itembasket = 'farm_basket',
propbasket = 'prop_crate_03a',
itemtable = 'farm_table',
proptable = 'prop_table_04'
},
-- Farm area settings
farmarea = {
-- Tomato Farm --
tomato = {
image = 'imgs/tomato.png',
resobj = 'luno_tomatoes',
distance = 2.0,
-- Blip settings
blip = {
using = true,
label = 'Farm - Tomato',
color = 57,
sprite = 237,
scale = 1.0
},
tableprocessing = {
label = 'Table Processing',
model = 'prop_rub_table_02',
pos = vec4(1898.6, 4921.51, 48.23, 66.73),
size = vec3(10.0, 10.0, 10.0),
dist = 1.3
},
-- Zone settings
zone = {
label = 'Tomato Farm',
pos = vec4(1902.94, 4904.17, 47.26, 95.61),
size = vec3(1.5, 1.5, 5.0),
dist = 1.3
},
-- Spawn locations
spawn = {
vec4(1915.64, 4854.54, 47.14, 316.86),
vec4(1917.25, 4856.18, 47.26, 316.86),
vec4(1918.87, 4857.82, 47.35, 316.86)
},
-- Text settings
text = {
icon = 'fas fa-apple-alt',
start = 'Start Planting',
stop = 'Stop Planting',
starticon = 'fas fa-check-circle',
stopicon = 'fas fa-stop-circle',
desc = 'The farmer has risen from his rest, strolling through the pathways of orchards and fields that form the backbone of his life.'
},
-- NPC settings
npc = {
use = true,
model = 'a_m_m_hillbilly_01',
dict = 'amb@code_human_police_investigate@idle_a',
anim = 'idle_b',
size = vec3(10.0, 10.0, 10.0),
},
-- Start bar settings
startbar = {
growth = 0,
health = 5,
water = 10,
fertilizer = 10
},
-- Props settings
props = {
start = 20,
initial = 'prop_bucket_01a',
levels = {
'prop_plant_int_04a',
'prop_plant_fern_02a',
'prop_veg_crop_01'
}
},
-- Harvest settings
harvest = {
[1] = {
level = 90,
label = 'A',
item = 'farm_tomato_a',
amount = 1
},
[2] = {
level = 60,
label = 'B',
item = 'farm_tomato_b',
amount = 1
},
[3] = {
level = 30,
label = 'C',
item = 'farm_tomato_c',
amount = 1
}
},
-- Items settings
items = {
seed = {
name = 'farm_tomato_seed',
amount = 1
},
fertilizer = {
name = 'farm_fertilizer',
amount = 1
},
water = {
name = 'farm_watercan',
amount = 1
},
pesticide = {
name = 'farm_pesticide',
amount = 1
}
}
}
}
}
return {
shops = {
shop1 = {
sell = true,
blip = {
using = true,
label = 'Farm Shop',
color = 2,
sprite = 52,
scale = 1.0
},
zone = {
title = 'Farm Shop',
desc = 'Specialized store offering a variety of agricultural products and tools for farmers',
textui = 'Farm Shop',
pos = vector4(-2509.66, 3614.71, 13.73, 70.0),
size = vec3(2.5, 2.5, 2.0),
dist = 1.3,
},
itembuy = {
[1] = {
name = 'Wooden Basket',
code = 'farm_basket',
img = 'farm_basket',
price = 5,
label = 'Buy'
},
[2] = {
name = 'Orange Seed',
code = 'farm_orange_seed',
img = 'farm_orange_seed',
price = 5,
label = 'Buy'
}
},
sellshop = {
[1] = {
name = 'Tomato A',
code = 'farm_tomato_a',
img = 'farm_tomato_a',
price = 5,
label = 'Sell'
},
[2] = {
name = 'Tomato B',
code = 'farm_tomato_b',
img = 'farm_tomato_b',
price = 5,
label = 'Sell'
}
}
}
}
}
Last updated