> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r-scripts.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Complete configuration guide for R_Store

## Basic Configuration

Open `config.lua` to customize R\_Store settings.

### Framework Settings

```lua theme={null}
R.Framework = "ESX" -- Options: ESX, qbcore, qbx
R.newESX = true -- Set to false for ESX 1.1
R.CoreName = "es_extended" -- Your core resource name
R.Inventory = "ox_inventory" -- Options: ESX, qb-inventory, ox_inventory, quasar
```

### Target System

```lua theme={null}
R.UseTarget = false -- Set to true if you use target
R.Target = "ox_target" -- Options: ox_target, qb-target
```

### Debug Mode

```lua theme={null}
R.Debug = false -- Enable for troubleshooting
```

## Commands

Configure the commands players and admins can use:

```lua theme={null}
R.GiveCreditCommand = "giveCredits" -- Console command to give credits
R.OpenStoreCommand = "store" -- User command to open store
R.ShowLicenseCommand = "storelicense" -- User command to copy license
```

## Fast Key Access

Allow players to open the store with a hotkey:

```lua theme={null}
R.EnableFastKey = true
R.ToggleKey = "F4" -- Key to open store
R.KeyText = "Open store" -- Key text for the command
```

<Tip>
  Popular keys: F4, F5, F6. Avoid keys used by other scripts.
</Tip>

## Currency Settings

Set which currency type is used for money purchases:

```lua theme={null}
R.MoneyCurrency = "bank" -- Options: bank, cash, black_money, etc.
```

## Enabled Pages

Control which categories are available in the store:

```lua theme={null}
R.EnabledPages = {
    vehicles = true, -- Vehicle shop
    money = true, -- Money shop
    items = true, -- Item shop
    weapons = true, -- Weapon shop
}
```

<Note>
  Disable pages you don't want to offer in your store.
</Note>

## Test Drive System

Configure the vehicle test drive feature:

```lua theme={null}
R.TestDriveTime = 1 -- Duration in minutes
R.TestDriveCooldownTime = 5 -- Cooldown between tests (minutes)
R.TestDrivePos = vector4(-1274.5339, -3389.3430, 13.9401, 329.8687)
```

### Setting Test Drive Location

1. Go to your desired location in-game
2. Type `/getcoords` or similar command
3. Copy the vector4 coordinates
4. Paste into `R.TestDrivePos`

## NPC Configuration

Customize the store NPC:

```lua theme={null}
R.Ped = {
    Model = "g_m_m_armboss_01", -- NPC model
    Scenario = "WORLD_HUMAN_AA_CLIPBOARD", -- Animation
    Location = vector4(-258.5634, -973.3538, 31.2200, 159.6876),
}
```

## Map Blip

Configure the store blip on the map:

```lua theme={null}
R.EnableBlip = true
R.BlipSettings = {
    Name = "Store", -- Blip name
    Pos = vector3(-258.5634, -973.3538, 31.2200),
    Sprite = 59, -- Blip icon
    Display = 4,
    Scale = 0.5, -- Blip size
    Colour = 15, -- Blip color
}
```

[View all blip sprites and colors](https://docs.fivem.net/docs/game-references/blips/)

## Casino Integration

Link R\_Store with R\_Casino:

```lua theme={null}
R.EnableCasino = false -- Set to true to show casino button
R.CasinoResourceName = "r_casino" -- Your r_casino resource name
R.CasinoCommand = "casino" -- Command to open casino
```

<Warning>
  Only enable if you have R\_Casino installed!
</Warning>

## Notifications

Enable/disable purchase notifications:

```lua theme={null}
R.EnablePurchaseNotifys = true
```

## Logging

Enable Discord logging for purchases:

```lua theme={null}
R.Enablelogs = true
```

Set your webhook in `server/sv_custom.lua` file.

## Auto-Insert

Enable automatic database table creation:

```lua theme={null}
R.EnableAutoinsert = true
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Learn About Exports" icon="code" href="/r_store/exports">
    Integrate with other scripts
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/r_store/common-issues">
    Fix common issues
  </Card>
</CardGroup>
