With this script you can add new drugs, with this script you can farm/process/sell(with npc)/use the drug with effect by just adding it to the config file.
You can use this script not only for drugs, but for other type of items to farm/process/sell.
Oh, sorry about this, this is because of column “limit” in database, the es_extended have to be to changed to get this working…
Search for in es_extended/server/common.lua around 22~31 line:
MySQL.Async.fetchAll('SELECT * FROM items', {}, function(result)
for k,v in ipairs(result) do
ESX.Items[v.name] = {
label = v.label,
weight = v.weight,
rare = v.rare,
canRemove = v.can_remove
}
end
end)
and replace with:
MySQL.Async.fetchAll('SELECT * FROM items', {}, function(result)
for k,v in ipairs(result) do
ESX.Items[v.name] = {
label = v.label,
weight = v.weight,
rare = v.rare,
limit = v.limit,
canRemove = v.can_remove
}
end
end)
Now open es_extended/server/main.lua and add a new item to table.insert at line 63 and 80: