Config file
--[[
- this script needs tgiann-core script to work, you can download the script from your keymaster account
Start tgiann-core script after es_extented/qb-core script and before tgiann-* scripts
Adjust the tgiann-core config file according to the framework you are using
Credit: bzzz_prop_seeds : https://bzzz.tebex.io/package/5073805
]]
tgiCoreExports = exports["tgiann-core"]
config = tgiCoreExports:getConfig()
config.objectSpawnDist = 100 -- spawn distance of plants
config.checkWhileTime = 300000 -- server side is the while loop. don't use too many low values
config.checkClientWhileTime = 500 -- client side while loop
config.lang = "en"
config.plantLang = {
tr = {
plant1Label = "Yeşil Ot",
plant1Description = "Yetiştirilmesi yasak olan yeşil ot bitkisi gelişmesi için bol suya ve güneşe ihtiyaç duyar. Bulundurulması, kullanılması ve ticaret haline getirilmesi yasak olmasının en büyük sebebi direkt yaprak halinde kullanılabilmesidir."
},
en = {
plant1Label = "Green Weed",
plant1Description = "The green grass plant, which is forbidden to be grown, needs plenty of water and sun for its growing. The biggest reason why it is forbidden to keep, use and commercialize is that it can be used directly as leaves."
},
}
config.playerPlantLimit = 5 -- The maximum number of plants a player can plant (0 for unlimited)
local plantLang = config.plantLang[config.lang]
config.plant = {
{
item = "weedseed", -- Useable item name for plant
waterItem = { -- item needed to increase the water value of the plant
item = "weedwater", -- item name
amount = 5, -- amount for each use
percent = 100, -- percent to increase
animTime = 30000 --milisecond(min 5000)
},
fertilizerItem = { -- item needed to increase the fertilizer value of the plant
item = "weedfertilizer", -- item name
amount = 5, -- amount for each use
percent = 100, -- percent to increase
animTime = 30000 --milisecond(min 5000)
},
burnItem = { -- item needed to burn the plant
item = "weedburn", -- item name
amount = 1 -- amount for each use
},
plantNeedItems = { -- extra starting items needed for planting
{
item = "plantbox", -- item name
amount = 1
}
},
plantableGroundHash = { -- hashes of plantable ground (You can find the hash with the getgroundhash command)
-461750719, -1286696947
},
giveItem = { -- the item and amount to be given when the plant is collected
item = "weed",
amount = { 1, 3 }, -- min-max amount (Also you can use like this 'amount = 1')
},
model = `bkr_prop_weed_lrg_01b`,
dirt = `bzzz_prop_seeds`,
negativeZ = 0.48,
startWater = 10, --max 100 (water value to start when the plant is first planted)
startFertilizer = 10, --max 100 (fertilizer value to start when the plant is first planted)
timeFullGrow = 3600, -- second (the time the plant reaches 100% growth rate)
timeFullRemoveWater = 1200, -- second (total time for the water value to decrease from 100 to 0)
timeFullRemoveFertilizer = 2500, -- second (total time for the fertilizer value to decrease from 100 to 0)
timeFullRemoveHealth = 600, --second (Time for health value to decrease from 100 to 0 without water and fertilezer value)
timeFullBurn = 30, -- second (deleting time of the plant after burning)
forGrowMinWater = 20, -- The minimum amount of water required for the plant to grow
forGrowMinFertilizer = 0, -- The minimum amount of fertilizer required for the plant to grow
headerImg = "weedseed.webp", -- Header img (tgiann-planting/assets)
label = plantLang.plant1Label, -- Menu label
description = plantLang.plant1Description, -- Menu description
canBurn = function(playerData) -- canBurn Function
if not playerData then playerData = tgiCoreExports:getPlayerData() end
return playerData.job.name == "police"
end,
canCollect = function(xPlayer, src, plantData) -- canCollect Function
local citizenid = tgiCore.getCid(xPlayer)
local canCollectVar = citizenid == plantData.citizenid
if not canCollectVar then
tgiCore.notif(src, config.langs[config.lang].notYour, "error")
end
return canCollectVar
end
}
}
for i = 1, #config.plant do
config.plant[i].index = i
end
config.langs = {}
Last updated