# Pawnshop

<figure><img src="https://686536647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXGRk0kmhwggVh0ryaOs%2Fuploads%2FIiitMr2xBzMujtyBJzqz%2Fpawnshop.jpg?alt=media&#x26;token=408088c6-80bf-422d-a52f-29d750117ed0" alt=""><figcaption></figcaption></figure>

##

{% hint style="danger" %}
Dependencies:

Renewed Weaponscarry: [https://github.com/Renewed-Scripts/Renewed-Weaponscarry/releases/tag/v2.5.2](https://github.com/Renewed-Scripts/Renewed-Lib/releases/tag/v2.0.7)

Ox Lib: <https://github.com/overextended/ox_lib/releases>

Bl Dialog: <https://github.com/Byte-Labs-Studio/bl_dialog>
{% endhint %}

{% hint style="info" %}
Features:

* Item appraisal system with dynamic values
* Configurable **base worth, accuracy, and offer percentages per item**
* Full **pawn (loan) system** with buyback functionality
* Configurable **interest rates for reclaiming items**
* Ability to **buy back pawned items before expiration**
* **Package recovery job system** with multiple package pickups
* Packages contain **multiple randomized items**
* Configurable **package tiers** (Scrap, Mixed, Valuable, Premium, Rare)
* Players only see **estimated value vs real value**
* Risk/reward gameplay when selling items
* **Reputation system** tied to pawnshop activities
* **Bulk selling system** (sell full or partial stacks)
* Accurate **server-side valuation calculations**
* Designed for **long-term economy balance**
  {% endhint %}

***

## Installation

### Qbox

Add the following to **qbx\_core > server > player.lua** (anywhere below line 451)

```lua
playerData.metadata.kevinpawnshop = playerData.metadata.kevinpawnshop or 0
```

### Qbcore

Add the following to **qb-core > config.lua** (within the <mark style="color:green;">metadata</mark> code block on line 62)

```lua
kevinpawnshop = 0,
```

***

### Inventory

#### Ox Inventory

```lua
-- Kevin Pawnshop Items
	["kevin_pawnshop_box"] = {
		label = "Pawnshop Box",
		weight = 2000,
		stack = false,
		close = true,
		description = "A box of pawn shop items",
	},
```

#### Qb Inventory

{% code overflow="wrap" %}

```lua
kevin_pawnshop_box                          = { name = 'kevin_pawnshop_box', label = 'Pawnshop Box', weight = 2000, type = 'item', image = 'kevin_pawnshop_box.png', unique = true, useable = true, shouldClose = true, description = 'A box of pawn shop items'},
```

{% endcode %}

***

### Prop Carry

Add the following below to renewed-weaponcarry > data > carry.lua

```lua
kevin_pawnshop_box = {
        slowMovement = 0,
        model = `prop_rub_boxpile_08`,
        pos = vec3(0.0, -0.1, 0.02),
        rot = vec3(3.0, 0.0, 0.0),
        bone = 28422,
        dict = 'anim@heists@box_carry@',
        anim = 'idle',
        disableKeys = {
            disableSprint = false,
            disableJump = true,
            disableAttack = true,
            disableDriving = true,
            disableVehicleEnter = true
        }
    },
```

***

{% hint style="success" %}
🎉 Installation Completed. Next step is just customization/adjusting config files to you liking
{% endhint %}
