This script offers a dynamic gardening job experience for the ESX Framework in FiveM. Players can take on various gardening tasks, such as weeding, tree trimming, and lawn mowing. The script includes a experience and level system, and payout system, as well as customizable task locations.
- Multiple Task Types: Players can choose from tasks like weeding, tree trimming, and lawn mowing.
- Experience and Reward System: Players earn experience points and money for each completed task.
- Customizable Vehicle and Zones: Vehicle and zone positions can be adjusted in the configuration file.
- Easy Configuration: All settings can be customized in the
Config.lua
file.
-
Download this repository and place it in your FiveM server's resources folder.
-
Ensure that ESX and MySQL are installed on your server.
-
Import the
skills_gardening.sql
file into your database to create the required tables. -
Add the script to your
server.cfg
file:ensure rlo_gardener
-
Adjust the configuration in the
config.lua
file to meet your server requirements.
The configuration is handled via the config.lua
file. Here are some of the key options:
Config = {}
Config.Debug = false -- Enable/disable debug mode
Config.DrawDistance = 50 -- Zone render distance
Config.ExperiencePerPoint = 10 -- Experience points per completed task
Config.MoneyPerPoint = 50 -- Payout per garden point
Config.Vehicle = 'mower' -- Vehicle model name
Config.VehicleSpawn = vector4(-42.0131, -412.1090, 40.3985, 69.7127) -- Vehicle spawn location
You can customize the locations of various zones under Config.Zones
, such as job management and vehicle deletion:
Config.Zones = {
ManageJob = {
Position = vector3(-45.5763, -415.8636, 39.4970),
Size = {x = 1.0, y = 1.0, z = 1.0},
Color = {r = 8, g = 163, b = 0},
Type = 41, Rotate = true
},
VehicleDelete = {
Position = vector3(-41.7814, -411.9491, 38.6962),
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 8, g = 163, b = 0},
Type = 25, Rotate = false
}
}
You can also configure the locations for garden and tree maintenance tasks:
Config.JobPickups = {
vector3(-154.0146, -440.3530, 33.7225),
-- Additional coordinates here...
}
Config.JobTrees = {
vector3(-154.0582, -463.6331, 32.9408),
-- Additional coordinates here...
}
The skills_gardening.sql
file creates the required database tables. Here’s an example of the table structure:
CREATE TABLE `skills_gardening` (
`identifier` VARCHAR(46) NOT NULL COLLATE 'latin1_swedish_ci',
`experience` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`identifier`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;