βοΈ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
π‘ 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

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:30means 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
UseRoutingBucketset 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 ifGiveItemsToPlayerisfalse).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.GiveItemsToPlayerto 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.ClientNotificationis a function that triggers the notification event on the client side.It adapts to different frameworks by triggering the appropriate event:
For ESX (
newesxoroldesx), it triggersesx:showNotification.For QBCore, it triggers
QBCore:Notifywith customizable parameters (message,type,length).
Server Notification
Config.ServerNotificationis 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:Notifywith 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:
tebexPurchaseWebhook triggered when a purchase is made through the Tebex store.purchaseRedeemWebhook triggered when a player redeems a purchase.tierExpiredWebhook triggered when a VIP tier expires for a player.purchasesContains 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.
adminActionsContains 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