Configuration
This page contains an example of a configuration file.
cfx-praryo-subscriptions/shared/config_main.lua
Config = {}
-- Server framework exports name
Config.CoreExports = {
['qb'] = 'qb-core',
['esx'] = 'es_extended',
}
-- Basic Configurations
Config.EnableDebug = true
Config.CommandName = 'subs'
Config.MultipleSubs = true -- Allow players to have multiple subscriptions.
-- Admin Configurations
Config.AdminManage = true -- Allow administrators to manage all subscriptions, admin management will not be shown if set to false.
Config.UseFrameworkPermissions = true -- Enabling this will use permissions of your core (Config.AdminPermissions), eg. For esx, xPlayer.getGroup(). If set to false, it will use the identifiers added on (Config.PermissionIdentifiers)
Config.AdminPermissions = { 'admin', 'mod' } -- Applicable only if you enable framework permissions.
Config.PermissionIdentifiers = { -- Applicable only if you disable framework permissions.
'license:12345678',
'steam:12345678',
}
Config.AdminActions = {
['add'] = true, -- Allows the administrators to give subscription to players.
['remove'] = true, -- Allows the administrators to remove subscription of players.
}
-- QBCore Configurations
Config.UseCitizenID = false -- Will use citizen id as identifier instead of license.
-- Main Configurations
Config.Subscriptions = {
['level_1'] = { -- Treat this as variable, do not include spaces, etc.
label = "Level 1 Subscription",
recurring = true, -- Expiration date will be set depending on days expiration if set to true. If set to false, all players with this subscription are for lifetime.
overlap = true, -- Allow the subscription to be redeem multiple times, this will increase the expiration date depending on your setting. If recurring is set to false, system will ignore this setting.
days = 30, -- Days of expiration after redeeming, if recurring is set to false, system will ignore this setting.
discord_role = "123456789001234" -- Players have this role will automatically have this subscription if discord role is enabled, set to nil of you don't want to use discord roles.
},
}
Last updated