harvestPlant
exports['RiP-Weed']:harvestPlant(farmId, plantId, cb)
This function harvests a farm's plant
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
farmId | Integer | No | Farm id |
plantId | Integer | No | Plant id |
cb | Function | Yes | Callback function |
Returned Object
Returns table of all farms if farmId
= nil
Name | Type | Explenation |
---|---|---|
plants | Array | Farm's plants |
storage | Array | Farm's storage |
earning | Integer | Harvested amount (gram) |
seed | Object | Harvested seed (config) data |
false
on error
Example
exports['RiP-Weed']:harvestPlant(1, 1, function(callback)
if callback then
print("plant was successfully harvested with "..callback.earning.." grams")
end
end)