This FiveM ESX script is adding Greenhouses to your Server. With Greenhouses, you can buy seeds and plant them. These planted seeds will grow over time into plants that can be harvested and sold.
-
esx_legacy v1.8.5 or higher
-
oxmysql v2.3.0 or higher
-
Onesync enabled
-
Serverversion 5949 or higher
-
Node v14 or higher
-
Yarn
-
Download esx_greenhouse.zip from https://github.com/Korgron/esx_greenhouse/releases/latest
-
unpack zip file and put the created folder in the
resources/
directory
-
execute the
build.sql
file inesx_greenhouse/sql
to create all required sql tables -
add to your server.cfg the following line at the bottom of your start order
ensure esx_greenhouse
-
Make sure that
Config.Multichar
is enabled ines_extended/config.lua
Config.Multichar = true
-
To update esx_greenhouse, download the newer version and run
update.sql
unless the above readme says otherwise. -
after updating the sql, following the steps of the normal Installation.
To add purchasable seeds to a greenhouse, you need to add them to the greenhouse_plants
table in your MySQL / MariaDB database.
There you will find two template plants tied to greenhouse_7. Each plant needs a name, a label, a price, a sell price, a maximum reward, a weight in g, a seed weight in g and the greenhouse id.
Example:
(name) | (label) | (price) | (sellprice) | (maximum reward) | (plant weight) | (seed weight) | (Greenhouse) |
---|---|---|---|---|---|---|---|
pgh_p_name | pgh_p_label | pgh_p_price | pgh_p_sellprice | pgh_p_maxProduce | pgh_p_weight | p_weight | f_pgh_id |
banana | Banana | 15 | 190 | 6 | 200 | 5 | 1 |
- German
Navigate into esx_greenhouse resource and execute the following command, to install dependencies
yarn install
While developing your resource, this boilerplate offers
a watch
script that will automatically hot rebuild on any
change within the client
or server
directories.
yarn watch
This script still requires you restart the resource for the changes to be reflected in-game
Client - ./client/index.ts
Server - ./server/index.ts
Once you have completed the development phase of your resource,
you must create an optimized & minimized production build, using
the build
script.
yarn build
esx_greenhouse - ESX Skript for ESX Framework used in FiveM
Copyright (C) 2022 Korgron
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.