> For the complete documentation index, see [llms.txt](https://urantix.gitbook.io/urantix-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://urantix.gitbook.io/urantix-docs/fivem-scripts/dealership/exports/client-exports.md).

# Client Exports

On this page, you'll find all the client exports of the resource

## InDealershipZone

Returns `true` if the local player is inside a dealership PolyZone.

```lua
exports["UrantixDealership"]:InDealershipZone(dealerId?)
```

<table><thead><tr><th width="123.3333740234375">Argument</th><th width="111.6666259765625">Required</th><th>Description</th></tr></thead><tbody><tr><td>dealerId</td><td>No</td><td>Dealership id from config (<code>general.id</code>). If empty, any dealership counts. If set, the player must be in that dealership’s zone.</td></tr></tbody></table>

> Examples of use

```lua
-- True while inside any dealership zone (useful for global checks)
if exports['UrantixDealership']:InDealershipZone() then
    -- e.g. disable third-party emotes or phone apps
end
```

```lua
-- True only inside this specific dealership
local atPdm = exports['UrantixDealership']:InDealershipZone('pdm')
if atPdm then
    -- e.g. show custom help text or trigger a job check
end
```

```lua
-- Works with numeric ids from JSON if your ids are numbers
local inside = exports['UrantixDealership']:InDealershipZone(tostring(zoneIdFromDatabase))
```

***

## InDealershipMenu

Returns `true` if the dealership vehicle catalog NUI (list / preview flow) is open.

```lua
exports["UrantixDealership"]:InDealershipMenu()
```

***

## DealershipVehicleList

Returns the vehicle list configured for that dealership. `dealerId` is required (same value as `general.id`). Does not require the player to be in the zone. Unknown or invalid id returns an empty table `{}`.

```lua
exports["UrantixDealership"]:DealershipVehicleList(dealerId)
```

> Examples of use

```lua
local vehicles = exports['UrantixDealership']:DealershipVehicleList('legion_motors')
if vehicles and #vehicles > 0 then
    for i = 1, #vehicles do
        local v = vehicles[i]
        -- v.name, v.price, v.label, etc. (shape matches your dealership JSON)
    end
end
```

```lua
local dealerId = 'pdm'
local stock = exports['UrantixDealership']:DealershipVehicleList(dealerId)
if not stock or #stock == 0 then
    print('No vehicles or unknown dealer id')
end
```

```lua
-- Always pass an id; omitting it returns {}
local bad = exports['UrantixDealership']:DealershipVehicleList() -- {}
```

***

## isTestDriveActive

Returns `true` if the player is on a TestDrive.

```lua
exports["UrantixDealership"]:isTestDriveActive()
```
