Configuration: Rental System

This section explains how to add or edit vehicles, boats, or planes in the HTNFW rental system by modifying the configuration file.
Adding or Editing Vehicles in the Rental System
- Locate the Configuration File:
- Navigate to the directory
\server-data\resources\[htn-addons]\htn-rentals\shared
.
- Navigate to the directory
- Open the Config File:
- Open the
Config.lua
file in a text editor.
- Open the
- Select a Category:
- Identify the category you want to edit:
cars
,boats
, orplanes
.
- Identify the category you want to edit:
- Add or Edit a Vehicle:
- Structure: Each category contains a list of entries in the format
{'vehicle_model', price, ''}
. - Adding a Vehicle:
- Copy an existing line from the desired category (e.g.,
{'faggio', 100, ''}
for cars). - Paste it into the appropriate category list.
- Replace
vehicle_model
with the spawn code of the new vehicle (e.g.,adder
for a car). - Set the rental
price
(e.g.,1200
). - Leave the third parameter as
''
(empty string). - Example: To add an
adder
car with a rental price of 1200, add{'adder', 1200, ''}
to thecars
category.
- Copy an existing line from the desired category (e.g.,
- Editing a Vehicle:
- Locate the vehicle entry in the desired category.
- Modify the
vehicle_model
orprice
as needed.
- Structure: Each category contains a list of entries in the format
- Save and Restart:
- Save the
Config.lua
file. - Restart the
htn-rentals
script or the entire server to apply the changes.
- Save the
Example Config:
Config = {}
Config.Rentals = {
['cars'] = {
{'faggio', 100, ''},
{'huntley', 600, ''},
{'bf400', 500, ''},
{'sultan', 750, ''},
{'sandking', 1000, ''},
},
['boats'] = {
{'seashark', 100, ''},
{'suntrap', 250, ''},
{'tropic', 350, ''},
},
['planes'] = {
{'frogger', 40000, ''},
{'dodo', 55000, ''},
}
}