# nova\_garage

NOVA Framework vehicle garage system. Handles storing, retrieving, and impounding vehicles.

## Features

* **Store Vehicles** — Park your vehicle at any garage location
* **Retrieve Vehicles** — Spawn stored vehicles at the garage
* **Impound System** — Recover impounded vehicles for a fee
* **Vehicle Persistence** — Saves mods, fuel, engine/body health
* **Multiple Garages** — Legion, Pillbox, Alta, Sandy Shores, Paleto Bay

## Configuration

Edit `config.lua`:

```lua
GarageConfig = {
    ImpoundPrice = 500,        -- Cost to recover from impound
    InteractDistance = 3.0,    -- Interaction range
    BlipSprite = 357,
    BlipColor = 3,
    BlipScale = 0.7,

    Garages = {
        ['legion'] = {
            label = 'Garagem Legion Square',
            coords = vector3(215.84, -803.56, 30.78),
            spawn = vector4(223.93, -800.23, 30.59, 248.5),
            blip = true,
        },
        -- More garages...
    },

    Impound = {
        coords = vector3(408.7, -1630.5, 29.29),
        spawn = vector4(401.79, -1632.17, 29.29, 228.0),
        label = 'Parque de Apreensão',
    },
}
```

### Configuration Options

| Option             | Type   | Description                                                |
| ------------------ | ------ | ---------------------------------------------------------- |
| `ImpoundPrice`     | number | Cash cost to recover impounded vehicle                     |
| `InteractDistance` | number | Distance to interact with garage/impound                   |
| `Garages`          | table  | Garage definitions with `coords`, `spawn`, `label`, `blip` |
| `Impound`          | table  | Impound location and spawn point                           |

### Adding a New Garage

```lua
['my_garage'] = {
    label = 'My Custom Garage',
    coords = vector3(x, y, z),
    spawn = vector4(x, y, z, heading),
    blip = true,
},
```

## Usage Examples

Use server exports or framework APIs for impound and store operations. Storing is typically done by the player driving to the garage and pressing E.

## Notes

* Vehicles not in the database (e.g., spawned via `/car`) are **automatically registered** when stored
* Impound recovery requires **cash** (not bank)
* Vehicle properties (colors, mods, neon, etc.) are saved via `GetVehicleProperties` / `SetVehicleProperties`
* The garage script uses `nova_core` for player data and money

## Security

* All operations are validated server-side
* Internal event names are not disclosed in this documentation for security purposes
