⚙️Script Configuration
Adjustments guide for mg-pawnshop
Framework Configuration
Defines which framework the script will use.

Database Configuration

Locales Configuration
Defines the language used by the script.
📌 Options:
'en'
→ English'pt'
→ Portuguese'fr'
→ French'es'
→ Spanish

Inventory Configuration
Defines which inventory system the script will use for storing and managing VIP items.
📌 Options:
'codem-inventory'
→ CodeM Inventory'ox_inventory'
→ OX Inventory'qb-inventory'
→ QB Inventory'esx_inventory'
→ ESX Inventory'qs-inventory'
→ QS Inventory

Item Images Path
Path to your inventory's item images folder.

Interaction System
📌 Options:
'qb-target'
'ox_target'
'drawtext'
'codem-textui'

Transaction Limits
Parameter
Description
Cooldown
Prevents spam by adding delay between transactions
CooldownTime
Cooldown duration in milliseconds (5000ms = 5 seconds)
MaxTransactionsPerHour
Maximum buys/sells per player per hour to prevent economy abuse
Weapon Handling
Parameter
Description
WeaponAsItem
true: Weapons are treated as inventory items false: Uses native GTA weapon system
If WeaponAsItem = true
, your inventory system must support weapon items. Some inventories may require additional configuration.
Pawnshop Locations
Defines where pawnshops spawn on the map and their visual properties.

Blip Sprites Reference
431
- Pawnshop icon52
- Store icon108
- Dollar sign500
- Bag of money
Category Configuration
Organizes items and weapons into menu categories for better navigation.
Item Categories
Used to group regular items in the pawnshop menu.

Weapon Categories
Groups weapons by type for organized browsing.

You can add custom categories by extending these tables. Ensure all items/weapons use valid category keys.
Price Filters
Quick-search filters for the pawnshop menu.

Pawnable Items (Selling)
Items that players can sell to the pawnshop.

Required Fields
Item Name: Must exactly match your item name
Label: Human-readable name shown to players
Price: Selling price in server's main currency
Category: Must exist in
Config.ItemCategories
Buyable Items (Purchasing)
Items that players can buy from the pawnshop.

All categories used in buyable items must be defined in Config.ItemCategories
.
Pawnable Weapons (Selling)
Weapons that players can sell to the pawnshop.

Weapon Names Reference
weapon_pistol
- Standard Pistolweapon_combatpistol
- Combat Pistolweapon_assaultrifle
- Assault Rifleweapon_knife
- Knifeweapon_bat
- Baseball Bat
Buyable Weapons (Purchasing)
Weapons that players can buy from the pawnshop.

Ensure all weapon categories exist in Config.WeaponCategories
. Weapons will only appear if their category is defined.
Notification System Configuration
Defines the notification events used by MG Pawnshop to send messages to players, both client-side and server-side.
Client Notification
Config.ClientNotification
is a function that triggers the notification event on the client side.It adapts to different frameworks by triggering the appropriate event:
For ESX (
newesx
oroldesx
), it triggersesx:showNotification
.For QBCore, it triggers
QBCore:Notify
with customizable parameters (message
,type
,length
).
Server Notification
Config.ServerNotification
is a function that triggers notifications from the server to a specific player (source
).It similarly adapts based on the framework:
For ESX, it uses
esx:showNotification
.For QBCore, it uses
QBCore:Notify
with parameters (source
,message
,type
,length
).
📌 Customization Notes
You can modify these functions to integrate with other notification systems or customize the way notifications are displayed by changing the events or adding parameters.

Discord Logging Configuration
This configuration controls the logging system. It allows you to send log messages to different Discord webhooks depending on the action performed or event triggered.
SVConfig.logSystem
Enables or disables the logging system.
true
→ Logging enabled, messages will be sent to Discord webhooks.false
→ Logging disabled, no messages will be sent.
SVConfig.webhooks
This section defines the Discord webhook URLs for different logging events. It is organized into categories for easy management:
Sell.item
Triggered when a Player sells an item to pawnshop.Sell.weapon
Triggered when a Player sells a weapon to pawnshopPurchase
Triggered when a Player buys items/weapons from pawnshop
📌Notes
Each webhook URL should be a valid Discord webhook link to ensure logs are delivered correctly.
Disable logging only if you want to avoid sending data externally or for performance considerations.

Last updated