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.
- Open the Config File:
- Open the
Config.lua file in a text editor.
- Select a Category:
- Identify the category you want to edit:
cars, boats, or planes.
- Add or Edit a Vehicle:
- Structure: Each category contains a list of entries in the format
{'vehicle_model', price, ''}. - 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, ''},
}
} - 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 the cars category.
- Editing a Vehicle:
- Locate the vehicle entry in the desired category.
- Modify the
vehicle_model or price as needed.
- Save and Restart:
- Save the
Config.lua file. - Restart the
htn-rentals script or the entire server to apply the changes.