⚙️Script Configuration
Adjustments guide for mg-vipsystem
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

Money Type for Diamond Purchases
Defines which type of money can be used to purchase items with diamonds.
📌 Options:
'bank'
→ Uses player’s bank balance.'cash'
→ Uses player’s cash on hand.

Currency Name Configuration
Defines the name of the VIP currency used in the system.
📌 Example:
'Diamonds'
→ The VIP currency will be called Diamonds everywhere in the system.

Starting Diamonds Configuration
Sets how many diamonds a new player will start with when they first join the server.
📌 Example:
0
→ New players will start with 0 Diamonds.

Tebex Store Link Configuration
Defines the link to your Tebex store. This is only used for the button that redirects players to your store.
📌 Example:
'https://mg-studios.tebex.io'
→ Clicking the store button will open the MG Studios Tebex page.

UI Configuration
Configures the appearance and behavior of the interface.
📌 Options:
ServerLogo
→ URL to the server’s logo displayed in the UI. Example:'https://r2.fivemanage.com/RxnHchmV04WVJzlhi9v4T/SemFundoV2.png'
will display this image as the logo.enableSounds
→ Enables or disables UI sounds when interacting with the system. Options:true
= enable,false
= disable.enableAnimations
→ Enables or disables UI animations. Options:true
= enable,false
= disable.style
→ Defines the UI layout style. Options:'classic'
= traditional layout,'modern'
= sidebar layout.

Test Drive Configuration
Enables and configures the test drive feature.
📌 Options:
TestDriveEnabled
→ Enables or disables the test drive feature. Options:true
= enabled,false
= disabled.TestDriveDuration
→ Duration in seconds for how long a test drive lasts. Example:30
means 30 seconds.TestDriveEndKey
→ The key players press to end the test drive early. Example:'BACK'
.TestDriveLocation
→ Coordinates where the test drive starts. Example:vector4(-1740.2286, -2916.1018, 13.9443, 337.0327)
CancelTestDriveOnExit
→ Cancels the test drive if the player exits the vehicle. Options:true
= cancel on exit,false
= do not cancel.TestDriveVehiclePlate
→ The license plate text for test drive vehicles. Example:'VIP TEST'
UseRoutingBucket
→ Uses routing buckets for test drive vehicles to avoid interfering with other players.
Note
It’s highly recommended to keep
UseRoutingBucket
set totrue
.

Commands Configuration
Defines the chat commands used to interact with the MG VIP System.
📌 Commands:
openMenu
→ Command to open the VIP menu. Default:'vipmenu'
giveDiamonds
→ Command for admins to give diamonds to players. Default:'givediamonds'
removeDiamonds
→ Command for admins to remove diamonds from players. Default:'removediamonds'
setDiamonds
→ Command for admins to set a player’s diamond amount directly. Default:'setdiamonds'
setVIP
→ Command for admins to assign a VIP tier to a player. Default:'setvip'
removeVIP
→ Command for admins to remove a VIP tier from a player. Default:'removevip'
finishTestDrive
→ Command to finish the current test drive. Default:'finishTestDrive'

Keybind Configuration
Enables and configures a keybind to open the VIP menu quickly.
📌 Options:
UseKeyBind
→ Enables or disables the keybind feature. Options:true
= enabled,false
= disabled.KeyBind
→ The key assigned to open the VIP menu when the keybind is enabled. Example:'F6'

Admin Groups Configuration
Defines which admin groups have permission to use the admin commands.
Groups set to true
will have access to commands like giving/removing diamonds and setting VIP tiers.

VIP Tiers Configuration
Enables and configures the VIP tiers available.
📌 Options:
TiersEnabled
→ Enables or disables the VIP tiers page. Options:true
= enabled,false
= disabled.VIPTiers
→ List of available VIP tiers with their details. Each tier includes:id
→ Unique identifier for the tier.label
→ Display name shown in the UI.duration
→ Duration of the VIP tier in days.benefits
→ List of benefits granted by this tier.price
→ Cost of the tier in diamonds.color
→ Hex color code for UI elements related to the tier.

Featured Offers Configuration
Enables and configures the featured offers shown on the main page of the VIP menu. These offers are for display purposes only and do not automatically grant items or bonuses.
📌 Options:
FeaturedOffersEnabled
→ Enables or disables the featured offers section. Options:true
= enabled,false
= disabled.FeaturedOffers
→ List of offers to display, each including:name
→ Title of the offer.description
→ Short description of the offer.image
→ Filename or URL for the offer’s image shown in the UI.active
→ Whether the offer is currently active and visible.
IMPORTANT
These featured offers are only visual displays in the VIP menu and do not provide any automatic rewards or purchases.

VIP Items Configuration
Enables and configures the VIP items available for purchase.
📌 Options:
VIPItemsEnabled
→ Enables or disables the VIP items page. Options:true
= enabled,false
= disabled.GiveItemsToPlayer
→ Defines how items are delivered to players.true
→ Items are given directly to the player’s inventory.false
→ Items are sent to a private stash (not available for defaultesx_inventory
).
VipStashCoords
→ Coordinates for the VIP stash location (only used ifGiveItemsToPlayer
isfalse
).VipStashInteraction
→ Interaction method used to access the VIP stash. Options:'qb-target'
,'ox-target'
,'codem-textui'
,'drawtext'
.
VIP Items List
Each item must include:
name
→ Name of the item.description
→ Brief description of the item.price
→ Cost in diamonds.item
→ Internal item identifier.image
→ Filename or URL of the item’s image.amount
→ Quantity given per purchase.

VIP Vehicles Configuration
Enables and configures the VIP vehicles available for purchase.
📌 Options:
VIPVehiclesEnabled
→ Enables or disables the VIP vehicles page. Options:true
= enabled,false
= disabled.Garage
→ Default garage name where VIP vehicles are stored (QBCore only).BoatGarage
→ Default garage for VIP boats (QBCore only).AirGarage
→ Default garage for VIP aircraft (QBCore only).
VIP Vehicles List
Each vehicle includes:
name
→ Display name of the vehicle.model
→ Vehicle model name used in the game.price
→ Cost in diamonds.image
→ Filename or URL for the vehicle’s image.category
→ Vehicle category, can becar
,air
, orboat
.

VIP Weapons Configuration
Enables and configures the VIP weapons available for purchase.
📌 Options:
VIPWeaponsEnabled
→ Enables or disables the VIP weapons page. Options:true
= enabled,false
= disabled.GiveAmmo
→ Determines whether ammo is given along with the weapons. Options:true
= ammo given,false
= no ammo.WeaponAsItem
→ If set totrue
, weapons are given as items instead of directly spawning the weapon.Note: This requires
Config.GiveItemsToPlayer
to betrue
; otherwise, it will not work.
VIP Weapons List
Each weapon must include:
name
→ Display name of the weapon.weapon
→ Internal weapon identifier used in-game.price
→ Cost in diamonds.image
→ Filename or URL of the weapon’s image.ammo
→ Amount of ammo given with the weapon.ammoItem
→ Item identifier for the ammo, adjust according to your ammo system.

Money Exchange Configuration
Enables and configures the feature that allows players to exchange diamonds for in-game money.
📌 Options:
MoneyExchangeEnabled
→ Enables or disables the money exchange feature. Options:true
= enabled,false
= disabled.
Money Exchange List
Each exchange option must include:
amount
→ Amount of in-game money the player will receive.price
→ Cost in diamonds required to purchase this money amount.label
→ Display label for the amount of money (used in the UI).

Notification System Configuration
Defines the notification events used by the MG VIP System 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:
tebexPurchase
Webhook triggered when a purchase is made through the Tebex store.purchaseRedeem
Webhook triggered when a player redeems a purchase.tierExpired
Webhook triggered when a VIP tier expires for a player.purchases
Contains webhooks for different purchase types:item
→ When a VIP item is purchased.weapon
→ When a VIP weapon is purchased.vehicle
→ When a VIP vehicle is purchased.tier
→ When a VIP tier is purchased.money
→ When money exchange is made.
adminActions
Contains webhooks for admin command logs:giveDiamonds
→ When diamonds are given to a player.removeDiamonds
→ When diamonds are removed from a player.setDiamonds
→ When diamonds are set to a specific amount.setVIP
→ When a VIP tier is assigned to a player.removeVIP
→ When a VIP tier is removed from a player.
📌Notes
Each webhook URL should be a valid Discord webhook link to ensure logs are delivered correctly.
Keeping logging enabled helps with monitoring purchases and admin actions for moderation and auditing purposes.
Disable logging only if you want to avoid sending data externally or for performance considerations.

Last updated