Script Setup

Download

Head to the BOII Development GitHub and download the latest release. Rename the resource folder to boii_utils.

Customise

The following instructions below cover some brief information on how to customise the utility library prior to installation.

Config

Open the included config.lua file to customise the default settings for your library.

Enable Debugging

Toggle the following to enable debug logs throughout the library.

--- Debug
--- @field debug: Toggle debug prints for the library
config.debug = false

UI Bridges

Set your chosen UI resources to whatever you would like the library to use. To use the included boii_utils UI elements leave these as default.

--- UI Bridge settings
config.ui = {
    drawtext = 'default', -- Options: 'default', 'boii_ui', 'boii_core', 'qb-core', 'es_extended', 'ox_lib', 'okokTextUI', 'custom'
    notify = 'default' -- Options: 'default', 'boii_ui', 'boii_core, 'qb-core', 'es_extended', 'ox_lib', 'okokNotify', 'custom'
}

Reputations

You can add any reputations you would like to include in the standalone reputation system here.

--- Reputation settings
config.reputation = {
    trucker = {
        id = 'trucker', -- Unique ID
        category = 'civilian', -- Category
        label = 'Truck Driver', -- Readable label
        level = 1, -- Starting level for players
        start_rep = 0, -- Starting rep
        first_level_rep = 1000, -- Amount of rep required for level 1 - 2
        growth_factor = 1.5, -- Increses amount of rep required per level by 1.5
        max_level = 10 -- Max level players can achieve
    }
}

Skills

You can add any skills you would like to include in the standalone skills system here.

--- Skills settings
config.skills = {
    begging = { 
        id = 'begging', -- Unique ID
        category = 'survival', -- Category
        label = 'Begging', -- Readable label
        level = 1, -- Starting level for players
        start_xp = 0, -- Starting xp
        first_level_xp = 1000, -- Amount of xp required for level 1 - 2
        growth_factor = 1.5, -- Increses amount of xp required per level by 1.5
        max_level = 20 -- Max level players can achieve
    }
}

Licences

You can add any licences you would like to include in the standalone licence system here.

--- Licences settings
config.licences = {
    car = {
        id = 'car', -- Unique ID
        label = 'Car Driving Licence', -- Readable label
        theory = false, -- Default pass setting for theory
        practical = false -- Default pass setting for practical
    }
}

CSS

You can customise any of the included UI elements through the .css files. You can also quickly customise the used colour pallette within the root.css.

Root Colours

These colours cover the entire palette used by default for the UI elements.

/* 
    Root settings:
    Contains colour palette settings for ui.
*/
:root {
    /* Fonts */
    --header_font_family: 'Kanit';
    --text_font_family: 'Roboto';

    /* Border Radius */
    --border_radius: 3px;

    /* Main Palette */
    --background: #141414;
    --secondary_background: #1f1e1e;
    --tertiary_background: #323030;
    --text_colour: #fff;
    --secondary_text_colour: #b4b4b4;
    --tertiary_text_colour: #666;
    --accent_colour: #fff;
    --secondary_accent_colour: #b53232;
    --tertiary_accent_colour: orange;
    --box_shadow: 0 2px 3px rgba(0, 0, 0, 0.8);
    --box_shadow_two_tone: 3px 5px 5px #0d0c0c, -4px -5px 6px #4dcbc2;
    --box_shadow_inset: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), inset -1px -1px rgba(0, 0, 0, 0.5);
    --text_shadow: -1px -1px 0px rgba(31, 30, 30, 1), 1px -1px 0px rgba(31, 30, 30, 1), -1px 1px 0px rgba(31, 30, 30, 1), 1px 1px 0px rgba(31, 30, 30, 1);
}

Install

Before starting your server make sure to add the included sql files into your database.

Add the boii_utils resource into your servers resources. Add ensure boii_utils into your server.cfg ensuring that it is placed before any resource requiring it as a dependency. Once you have completed all of the above you can restart your server and the library will be up and running.

Last updated