⚙️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

💡 You can add your own language by creating a new file in the locales folder and adding it to the Config.Locale list.


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


Pawnshop Locations

Defines where pawnshops spawn on the map and their visual properties.

Blip Sprites Reference

  • 431 - Pawnshop icon

  • 52 - Store icon

  • 108 - Dollar sign

  • 500 - Bag of money

You can find more blip sprites at FiveM Blip Sprites List


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.


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.


Pawnable Weapons (Selling)

Weapons that players can sell to the pawnshop.

Weapon Names Reference

  • weapon_pistol - Standard Pistol

  • weapon_combatpistol - Combat Pistol

  • weapon_assaultrifle - Assault Rifle

  • weapon_knife - Knife

  • weapon_bat - Baseball Bat


Buyable Weapons (Purchasing)

Weapons that players can buy from the pawnshop.


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 or oldesx), it triggers esx: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).


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 pawnshop

  • Purchase Triggered when a Player buys items/weapons from pawnshop

Last updated