🔧Config

General Information

To understand the structure

Because we have extensive configuration files, nested tables is an inevitability. To keep track of which values are for which table we use the tablename.value. This can also stack, for example location.blip.enabled etc.

Additional Settings

If there is a feature within the script that you can't find in the script's config, there is a chance that the configuration lies within Zyke Lib. This is to ensure that you never have to configure your targeting menu, framework etc over and over again.

Keys

All available keys can be found here.

Props Models

All prop models can be found here.

Ped Models All ped models can be found here.

Blip Settings All blip settings can be found here.

Config.Settings

All basic settings.

language

Set this to a language file available. By default there is "en". You can create your own translations in the locales folder and set your language here.

Example:

Config.Settings = {
    language = "en",
}

openPhoneItem

The item that registers are usable and opens the phone upon use.

Example:

Config.Settings = {
    openPhoneItem = "gang_phone",
}

artificialLoadTime

Added loading time to ensure predictable results and no flashing, a minimum of 100ms is mandatory, 300ms for fast, 500ms for medium and 1000ms for slow

Example:

Config.Settings = {
    artificialLoadTime = 500,
}

logsMasterSwitch

Easily enable or disable all logging with a master switch.

Example:

Config.Settings = {
    logsMasterSwitch = true,
}

removeTransactionFromHistory

In days, how long before a transaction will be removed from the history. This system is in place to purge old and unneeded data. This action will take place on script start. Could be set to a really high number to save really old transactions, but is recommended to keep 2 weeks at most, as anything else is usually not necessary.

Example:

Config.Settings = {
    removeTransactionFromHistory = 14,
}

allowLeaveUponJoin

Setting this to true allows you to join another gang and instantly leave your old. Set this to false to force your gang leader to kick you first. This setting aims to create interesting scenarios where you have to leave your gang behind properly, instead of just randomly vanishing.

Example:

Config.Settings = {
    allowLeaveUponJoin = false,
}

leaveCommand

Set this to nil or "" to remove the ability to leave your gang through a command. If you leave it as a value, any member can type this command and leave the gang.

Example:

Config.Settings = {
    leaveCommand = "leavegang",
}

minStrikeCharLength

Minimum amount of characters required in a strike reason. This is to encourage admins to leave a proper description of why the gang was given a strike. Can be set to 0 to allow empty descriptions.

Example:

Config.Settings = {
    minStrikeCharLength = 5,
}

maxStrikeCharLength

Maximum amount of characters a strike description can have. Recommended to keep resonably high to allow for extensive descriptions, so that the evidence can be used later if needed. But it is not recommended to keep too high, as it is information that needs to be fetched and takes more resources if unnecessarily long.

Example:

Config.Settings = {
    maxStrikeCharLength = 300,
}

stashes

Various settings to configure the stash a gang can place.

Example:

Config.Settings = {
    stashes = {
        enabled = true,
        stashId = "gangstash:%s",
        label = "%s's Stash",
        propModel = "prop_ld_int_safe_01",
        weight = 100000,
        slots = 100,
        placement = {
            insideTurf = true,
        }
    },
}

stashes.enabled

Enable or disable the ability for gangs to place and use stashes.

Example:

stashes = {
    enabled = true,
}

stashes.stashId

Has to be a unique id, the %s will be replaced with your gang id. You can change this freely but if you do, items in the old stashes will disappear as they get a new id. Just remember to always include the %s so that the stash id remains unique.

Example:

stashes = {
    stashId = "gangstash:%s",
}

stashes.label

Display label for the stash. Replaces %s with the gang name. Does not need to be unique.

Example:

stashes = {
    label = "%s's Stash",
}

stashes.propModel

The model that the stash will use to interact with if you are using a targeting system.

Example:

stashes = {
    propModel = "prop_ld_int_safe_01",
}

stashes.weight

The weight for the stash.

Example:

stashes = {
    weight = 100000,
}

stashes.slots

The slots for the stash.

Example:

stashes = {
    slots = 100,
}

stashes.placement

Various settings for the placement of stashes.

Example:

stashes = {
    placement = {
        insideTurf = true,
    }
}

stashes.placement.insideTurf

If set to true, this will require the gang leader to place their stash inside of their turf. This can also be set to false to allow stashes to be placed anywhere on the map.

Example:

placement = {
    insideTurf = true,
}

vehicleSpawner

Various settings for the vehicle spawner. Example:

Config.Settings = {
    vehicleSpawner = {
        enabled = true,
        refreshInterval = 3,
        maxVehicles = 2,
        propModel = "prop_parkingpay",
        placement = {
            insideTurf = true,
        },
        bagIdentifier = "zyke_gangphone:%s",
    },
}

vehicleSpawner.enabled

Set to true to enable the ability to spawn vehicles, set to false to disable it.

Example:

vehicleSpawner = {
    enabled = true
}

vehicleSpawner.refreshInterval

In seconds, how often the vehicle spawners can refresh if you open them, should leave at default. This is for optimization purposes. Can bet set lower for more fluid updating, but takes more resources and should not be required.

Example:

vehicleSpawner = {
    refreshInterval = 3,
}

vehicleSpawner.maxVehicles

Max vehicle a gang can have out at the same time. The vehicles are spawned and taken care of server-sided, which means that they are persistent and don't disappear randomly.

Example:

vehicleSpawner = {
    maxVehicles = 2,
}

vehicleSpawner.propModel

Prop model for the spawner you interact with if you are using a target menu.

Example:

vehicleSpawner = {
    propModel = "prop_parkingpay",
}

vehicleSpawner.bagIdentifier

All vehicles have a statebag to track which vehicle is owned by the gang in case of any mishaps. This setting should not be touched. %s gets replaced with the gang's id.

Example:

vehicleSpawner = {
    bagIdentifier = "zyke_gangphone:%s",
}

vehicleSpawner.placement

Various settings for the placement of vehicle spawners.

Example:

vehicleSpawner = {
    placement = {
        insideTurf = true,
    }
}

vehicleSpawner.placement.insideTurf

If set to true, this will require the gang leader to place their vehicle spawner inside of their turf. This can also be set to false to allow vehicle spawners to be placed anywhere on the map.

Example:

placement = {
    insideTurf = true,
}

hud

Various settings to configure the hud. Example:

Config.Settings = {
    hud = {
        enabled = true,
        position = "top-right",
        showMoney = true,
    },
}

hud.enabled

Set to true to enable the hud or false to disable it.

Example:

hud = {
    enabled = true,
}

hud.position

This value allows you to configure where you see the hud to fit best. Available:

  • top-left

  • top-right

  • bottom-left

  • bottom-right

Example:

hud = {
    position = "top-right",
}

hud.showMoney

Set to true to display your gang's money along with your gang name, or false to disable it.

Example:

hud = {
    showMoney = true,
}

gangInvitesCommand

Command to open your gang invites. All your invites can be accepted or declined in here.

Example:

Config.Settings = {
    gangInvitesCommand = "ganginvites"
}

gangCreation

Various settings for gang creation. Example:

Config.Settings = {
    gangCreation = {
        permission = "admin",
        defaultRanks = {
            {name = "leader", label = "Leader"},
            {name = "viceleader", label = "Vice-Leader"},
            {name = "shooter", label = "Shooter"},
            {name = "member", label = "Member"},
            {name = "newbie", label = "Newbie"},
        },
        defaultImg = "https://cdn.discordapp.com/attachments/930979289011195924/1154838313581158400/New_Logo.png", -- Default image for gangs that don't have one
    },
}

gangCreation.permisison

The permission required to whitelist another player for creation a gang.

Example:

gangCreation = {
    permission = "admin",
}

gangCreation.defaultImg

The default image for a gang if they don't choose an image.

Example:

gangCreation = {
    defaultImg = "https://cdn.discordapp.com/attachments/930979289011195924/1154838313581158400/New_Logo.png"
}

gangCreation.defaultRanks

A list of default ranks. Note that you need to have at least one rank in here for the script to work, as each member is assigned the rank at the bottom.

Example:

gangCreation  = {
    defaultRanks = {
        {name = "leader", label = "Leader"},
        {name = "viceleader", label = "Vice-Leader"},
        {name = "shooter", label = "Shooter"},
        {name = "member", label = "Member"},
        {name = "newbie", label = "Newbie"},
    }
}

gangCreation.defaultRanks[x].name

The name for your rank. This has to be unique. Recommended to follow the format above and name it the same as your label but with non-capital letters.

Example:

name = "leader",

gangCreation.defaultRanks[x].label

The label for your rank. This is what will be displayed throughout the script.

Example:

label = "Leader",

turfCreation

Various settings for the turf creation.

Example:

Config.Settings = {
    turfCreation = {
        permission = "admin"
    }
}

turfCreation.permission

The permission required to create gang turfs.

Example:

turfCreation = {
    permission = "admin",
}

adminMenu

Various settings for the admin menu. Example:

Config.Setings = {
    adminMenu = {
        permission = "admin",
        command = "admingang",
    },
}

adminMenu.permission

Permission required to open and use the admin menu.

Example:

adminMenu = {
    permission "admin",
}

adminMenu.command

The command to open the admin menu.

Example:

adminMenu = {
    command = "admingang"
}

turfWar

Various settings for the turf war. All cooldowns will start at the time the attacks start and have the preparation time added to it. Example:

Config.Settings = {
    turfWar = {
        enabled = true,
        attackCooldown = 1,
        defenceCooldown = 1,
        minimumDefenders = 1,
        minimumAttackers = 1,
        preparationTime = 60,
        attackReward = 30000,
        defenceReward = 25000,
        timer = {
            use = "static",
            static = 300,
            advanced = 60,
        },
        drawParticipant = function(pos, color, vehicle)
            -- Function
        end
    },
}

turfWar.enabled

Set to true to enable turf wars, set to false to disable them.

Example:

turfWar = {
    enabled = true,
}

turfWar.attackCooldown

In minutes, how long between each time your gang can start a turf war against another gang.

Example:

turfWar = {
    attackCooldown = 60,
}

turfWar.defenceCooldown

In minutes, how long between each time your gang can defend a turf war. This setting is recommended to be set rather high, to prevent you from constantly being attacked.

Example:

turfWar = {
    defenceCooldown = 180,
}

turfWar.minimumAttackers

The minimum amount of members online in the attacking gang to start a turf war against another gang.

Example:

turfWar = {
    minimumAttackers = 2,
}

turfWar.minimumDefenders

The minimum amount of members online in the defending gang for the attackers to start a turf war.

Example:

turfWar = {
    minimumDefenders = 2,
}

turfWar.preparationTime

In seconds, how long you have to prepare for the turf war after you announced the attack. This is recommended to be set rather high, to allow for the gangs to get back to their turf before the war starts, otherwise they will instantly fail it.

Example:

turfWar = {
    preparationTime = 60,
}

turfWar.attackReward

Amount of money your gang gets if you successfully attacked and won a turf war. Can be disabled by setting it to 0.

Example:

turfWar = {
    attackReward = 30000,
}

turfWar.defenceReward

Amount of money your gang gets if you successfully defend a turf war. Can be disabled by setting it to 0.

Example:

turfWar = {
    defenceReward = 25000,
}

turfWar.timer

Various settings for the turf war timer.

Example:

turfWar = {
    timer = {
        use = "static",
        static = 300,
        advanced = 60,
    },
}

turfWar.timer.use

There are two ways the timer can act that you can choose from. "static"

Static ("static") The timer has a static timer and will always remain the same. Advanced ("advanced") The timer changes based on war participant count.

Example:

timer = {
    use = "static",
}

turfWar.timer.static

If you are using a static timer, set in seconds how long you want the turf war to last. Example:

timer = {
    static = 300,
}

turfWar.timer.advanced

If you are using an advanced timer, set in seconds how long you want the turf war to last. Using an advanced timer will take the total participant count and multiply it by your timer value. Example is 3 attackers and 4 defenders, that will result in 7 * 60 = 420s Example:

timer = {
    advanced = 60,
}

turfWar.drawParticipant

This is the function that is triggered to draw participants. It can be changed to whatever you want, but is recommended to keep default unless you know what you are doing.

gangWar

Various settings for the gang war. When selecting a way for the war to end, you are required to use at least one value, but you can also use both. This means that the time can be cut short if you hit the score, or vice versa. Or you can have it limited to one only. Example:

Config.Settings = {
    gangWar = {
        enabled = true,
        deathGracePeriod = 10,
        pointOnKill = 1,
        pointOnLeaderKill = 1,
        maxTimeOptions = {
            {value = 0, label = "No Limit"},
            {value = 4, label = "4 Hours"},
            {value = 12, label = "12 Hours"},
            {value = 24, label = "24 Hours"},
            {value = 48, label = "48 Hours"},
            {value = 72, label = "72 Hours"},
        },
        maxScoreOptions = {
            {value = 0, label = "No Limit"},
            {value = 2, label = "2 Points"},
            {value = 25, label = "25 Points"},
            {value = 50, label = "50 Points"},
            {value = 100, label = "100 Points"},
            {value = 175, label = "175 Points"},
        },
        maxMoneyWager = 1000000,
        moneyWagerStepperDivider = 100,
        drawParticipant = function(pos, color, vehicle)
            -- Function
        end
    },
}

gangWar.enabled

Set to true to enable gang wars, set to false to disable them.

Example:

gangWar = {
    enabled = true,
}

gangWar.deathGracePeriod

In seconds, when you die there is a grace period where if you get marked as alive and then dead again, it will not count. This is to counter the sideeffects of using a custom death script that might act this way. Adjust if needed.

Example:

gangWar = {
    deathGracePeriod = 10,
}

gangWar.pointOnKill

The amount of points you get per kill.

Example:

gangWar = {
    pointOnKill = 1,
}

gangWar.pointOnLeaderKill

The amount of points you get per leader kill. Can set it to 0 to count as deaths the same, set it to 1 and above to give additional points for killing the leader. Note that this has nothing to do with any ranks, and only has effect on the current leader of the gang, which is the person that can invite, modify ranks, disband the gang etc.

Example:

gangWar = {
    pointOnLeaderKill = 1,
}

gangWar.maxMoneyWager

Max amount of money that can be wagered. The choice is done through a slider, so it is recommended to keep this realistic to not make the slider jump around too much.

Example:

gangWar = {
    maxMoneyWager = 1000000,
}

gangWar.moneyWagerStepperDivider

Each tick on the slider is the gangWar.maxMoneyWager divided by this value.

Example:

gangWar = {
    moneyWagerStepperDivider = 100,
}

gangWar.maxTimeOptions

A list of options to select how long the war will go on for. Example:

gangWar = {
    maxTimeOptions = {
        {value = 0, label = "No Limit"},
        {value = 4, label = "4 Hours"},
        {value = 12, label = "12 Hours"},
        {value = 24, label = "24 Hours"},
        {value = 48, label = "48 Hours"},
        {value = 72, label = "72 Hours"},
    },
}

gangWar.maxOptions[x].value

The actual value for the length of the gang war. This value is calculated in hours.

Example:

value = 12,

gangWar.maxOptions[x].label

The display label for the value. Example:

label = "12 Hours",

gangWar.maxScoreOptions

A list of options to select how much score is required to end the war. Example:

gangWar = {
    maxScoreOptions = {
        {value = 0, label = "No Limit"},
        {value = 10, label = "10 Points"},
        {value = 25, label = "25 Points"},
        {value = 50, label = "50 Points"},
        {value = 100, label = "100 Points"},
        {value = 175, label = "175 Points"},
    }
}

gangWar.maxScoreOptions[x].value

The amount of kills required to end the war. Example:

value = 25,

gangWar.maxScoreOptions[x].label

The display label for the value. Example:

label = "50 Points",

gangWar.drawParticipant

This is the function that is triggered to draw participants. It can be changed to whatever you want, but is recommended to keep default unless you know what you are doing.

settings

Various settings for the personal settings.

Example:

Config.Settings = {
    settings = {
        kvpIdentifier = "zyke_gangphone_settings",
        optionKeys = {},
        options = {
            {
                name = "vehicleBlips",
                default = 1,
                options = {true, false}
            },
            {
                name = "scoreboard",
                default = 1,
                options = {true, false}
            },
            {
                name = "friendlyWarMarkers",
                default = 1,
                options = {true, false}
            },
            {
                name = "enemyWarMarkers",
                default = 1,
                options = {true, false}
            },
            {
                name = "gangNames",
                enabled = true,
                default = 1,
                options = {false, "basic", "advanced"},
            }
        }
    }
}

gangWar.kvpIdentifier

The identifier the settings are saved at. This has to be unique from other kvp identifiers on your server. Note that if you change this, everyone's settings will reset. It is recommended to not touch unless you know what you are doing.

Example:

settings = {
    kvpIdentifier = "zyke_gangphone_settings",
}

gangWar.optionKeys

Do not touch.

gangWar.options

A list of options to toggle in the phone. Example:

gangWar = {
    options = {
        {
            name = "vehicleBlips",
            default = 1,
            options = {true, false}
        },
        {
            name = "scoreboard",
            default = 1,
            options = {true, false}
        },
        {
            name = "friendlyWarMarkers",
            default = 1,
            options = {true, false}
        },
        {
            name = "enemyWarMarkers",
            default = 1,
            options = {true, false}
        },
        {
            name = "gangNames",
            enabled = true,
            default = 1,
            options = {false, "basic", "advanced"},
        }
    }
}

gangWar.options[x].name

Do not touch.

gangWar.options[x].enabled

If the option has this key, you can enable it by setting it to true and disable it by setting it to false. Note that you can not add this key yourself. Example:

enabled = true,

gangWar.options[x].default

The default value for the setting each time a person loads the settings for the first time. Recommended to keep default, but can be changed based on your server's preference. The value is the index for the setting in gangWar.options[x].options Example:

default = 1,

gangWar.options[x].options

Do not touch.

Last updated