ai-rental
Rental points that rent vehicles for a fee and a deposit, with the deposit back on return.
ai-rental lets players rent a vehicle at a counter for a fee and a deposit. The deposit comes back when the vehicle is returned in time, less if it is damaged.
What it does in the game
- Walk to a rental counter (within 2 m) and press the interact key at Rent a vehicle at .... A menu lists the vehicles with their fee, deposit and rental time.
- Pick one: the fee and the deposit are taken together from the panel's account. The vehicle appears at the point's spawn spot with a full tank, a plate starting with the panel's plate start (for example
RNT12345), the keys, and you in the driver seat. - Bring it back near the counter (within the return radius) and press the interact key at Give the rental back. The deposit comes back scaled by the vehicle's condition (engine and body health): a perfect car returns the whole deposit, a wreck returns nothing.
- When the rental time runs out, the vehicle disappears and the deposit is kept. A rental time of 0 runs until the vehicle is given back.
- One rental per player at a time. Leaving the server ends the rental: the vehicle is deleted and the deposit kept.
Installation
Installed by the AI Core recipe. By hand: ensure ai-rental after ai-core. No database table. One rental point comes ready: LSIA Car Rental at the airport, renting a Dinka Blista, a Declasse Asea, a Bravado Bison and a Pegassi Faggio for 60 minutes.
Panel settings
Admin panel > Vehicle rental.
Tab: Rental points
Where players rent vehicles, which vehicles of the list they can rent there and for how long. One record per point (New rental point / Delete rental point). Deleting a point removes it, its blip and its vehicle list; vehicles rented there now stay until they are given back or their time ends.
Rental point card: the counter players walk to and where the rented vehicle appears.
| Setting | What it changes | Unit | Default for new |
|---|---|---|---|
| Name | Shown on the prompt and the menu. 1-48 characters. | ||
| Counter | Players rent here (2 m) and give vehicles back around it (return radius in Settings). | point | |
| Vehicle spawn | Where and facing which way the rented vehicle appears; the renter sits in it at once. | point + heading | |
| Map blip | Shows this point on the map. | on / off | on |
| Blip look | Icon, color and size of this point's blip. | icon 225, color 2, size 0.7 | |
| Rental time | When it runs out the vehicle disappears and the deposit is kept. 0 = until given back. 0-1440. | min | 60 |
Vehicles card: vehicles of the vehicle list this point rents out; fee and deposit are set in the Vehicles tab.
| Setting | What it changes |
|---|---|
| Vehicles | Up to 30 rows (Add vehicle), each one picked from the Vehicles tab list. |
Tab: Vehicles
Every vehicle that can be rented, with its name, fee and deposit; rental points pick from this list. One record per vehicle (New vehicle / Delete vehicle). Deleting a vehicle removes it from every rental point that offered it; vehicles rented now stay until they are given back or their time ends.
| Setting | What it changes | Unit | Default for new |
|---|---|---|---|
| Model | The game's model name of the vehicle (addon vehicles too). Up to 32 characters. | blista | |
| Name | The name in the rental menu. 1-48 characters. | ||
| Fee | Paid when renting, never given back. 0-1,000,000. | $ | 150 |
| Deposit | Paid when renting, given back when the vehicle is returned in time. 0-1,000,000. | $ | 300 |
Tab: Settings
Money and plates of every rental. Applies to every rental point.
| Setting | What it changes | Unit | Default |
|---|---|---|---|
| Paid from | The ai-core account the fee and deposit are taken from and the deposit goes back to. | bank | |
| Plate start | Up to 4 letters in front of the plate number, so rented vehicles are easy to spot. The plate is 8 characters in total. | RNT | |
| Return radius | How close to the counter a rented vehicle must be to give it back. 3-50. | m | 15 |
Commands and keybinds
None. The prompts use the interact key (E by default).
Known limits
- Rentals live only in memory: a resource restart deletes every rented vehicle and keeps the deposits.
- A vehicle parked on the spawn spot blocks renting ("Something is parked on the spawn spot").
- Only one account pays: fee and deposit together must fit in it.