DEVHUB DOCUMENTATION
Tebex StoreDevhub LIbDiscord Support
  • 🏠Home page
  • 🐌Download purchased assets
  • â‰ī¸Error: "You lack the required entitlement to use"
  • â‰ī¸Error: syntax error near '<\1>'
  • 💾Partnered FiveM Hosting
  • 💾SCRIPTS
    • 📗devhub_lib (NEEDED FOR EACH SCRIPT!)
      • đŸ’ģInstallation
      • 2ī¸âƒŖMigration from v1 to v2
      • âš™ī¸Framework
      • đŸ–ī¸Target
      • 🧭Ui
      • 🔑Vehicle Keys
      • â›ŊVehicle fuel
      • 🔊Sound System
      • 👕Clothing
      • â„šī¸Logs
      • 📡SQL
      • 🎨UI Color Customization
      • 🆘Compatibility test
  • 🔧Car Tune
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • 💾Saving Cartune Settings
  • 🚙Car Dancing
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • Beat generating
  • đŸ’ĒSkill Tree
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • đŸŽĢDevelopment
      • Listeners
      • Exports
      • Example skill
      • Pre-made skills
    • âš™ī¸Skill Generator
    • 🎨UI Color Customization
    • ❔FAQ
  • â›ī¸Miner Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • đŸĒĩDrywood Cutter Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
      • zones.lua
    • 🎨UI Color Customization
  • 🌊Pool Cleaner Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
      • zones.lua
    • 🎨UI Color Customization
  • đŸŒŋ[FREE] Herbal Alchemist Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • 📱Who Am I?
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • shared.lua
      • server.lua
    • 🎨UI Color Customization
  • 🎆Skill Selection
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • đŸ’ĒSkill Tree connection
    • 🎨UI Color Customization
  • 🍲3D CRAFTING TABLE
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • ❓How to create table
    • 🌹Custom props
  • đŸ‹ī¸Gym
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
  • â™Ÿī¸Props
    • đŸ–ŧī¸Paintings Pack
    • đŸ”ĒKitchen Furniture Pack
Powered by GitBook
On this page
  • Main Configuration (sh.main.lua)
  • Basic Settings
  • Skill Tree Settings
  • Abilities
  • Hotbar settings
  • CustomHotBarCss
  • Language Configuration (sh.lang.lua)
  • Framework File (s.framework.lua)
  • Functions File (c.functions.lua)
  • useRaycast usage:
  1. Skill Selection

Configuration

PreviousInstallationNextSkill Tree connection

Last updated 2 months ago

Main Configuration (sh.main.lua)

Basic Settings

Config.MenuCommand = "skillSelection"  -- Command to open menu (string or false)
Config.Keybind = "F6"                 -- Keybind to open menu (string or false)

Skill Tree Settings

Config.UseDataFromSkillTree = false  -- true/false

Use data about unlocked skills from the skill tree


Abilities

Config.Abilities = {
    ['wizard'] = {
        name = "Wizard",
        displayOrder = 1,
        isVisible = function(source)
            -- return true if the ability should be visible in the UI
            -- server side
            return true
        end,
        abilities = {
            ['water_spell'] = {
                label = "Water spell",
                icon = "fas fa-user",
                useCooldown = 5,
                onUse = function()
                    -- client side
                    print("Water spell used by "..GetPlayerName(PlayerId()))
                    return true -- return true if the ability was used successfully, false cooldown will not be triggered
                end
            },
            ['fire_spell'] = {
                label = "Fire spell",
                icon = "fire_spell.png",
                useCooldown = 5,
                onUse = function()
                    -- client side
                    print("Fire spell used by "..GetPlayerName(PlayerId()))
                    return true -- return true if the ability was used successfully, false cooldown w
                end
            },
        }
    },
    ['vampire'] = {
        name = "Vampire",
        displayOrder = 2,
        isVisible = function(source)
            -- return true if the ability should be visible in the UI
            -- server side
            return true
        end,
        abilities = {
            ['more_hp'] = {
                label = "More Hp",
                icon = "more_hp.png",
                useCooldown = 5,
                onUse = function()
                    -- client side
                    print("More hp used by "..GetPlayerName(PlayerId()))
                    return true -- return true if the ability was used successfully, false cooldown w
                end
            },
        }
    },
}

Hotbar settings

Config.UseBuildInHotBar = true   --- true/false

Use the build in hotbar, if set to false you can use your own hotba if you are using custom hotbar use client event to listen for hotbar changes

RegisterNetEvent('devhub_skillSelection:client:syncSlots', function(data) end) 

data is a table with structure like this:

{
   [2] = { -- slot 2
         category = "wizard", 
         uid = "water_spell", 
         label = "Water spell", 
         icon = "fas fa-user"
   }, 
   [6] = { -- slot 6
         category = "vampire", 
         uid = "vampire_spell", 
         label = "Vampire spell", 
         icon = "fas fa-user
   },  
}

Config.DisplayHotBarOnScriptLoad = true   --- true/false

Display the hotbar on script load, if set to false you can set when hotbar should be displayed using client event:

TriggerEvent('devhub_skillSelection:client:hotBarDisplayStatus', true)

If you are using custom hotbar you also need to set the hotbar slots.

Config.HotBarSlots = {
    { slotKey = "1", slotLabel = "1" },
    { slotKey = "2", slotLabel = "2" },
    { slotKey = "3", slotLabel = "3" },
    { slotKey = "4", slotLabel = "4" },
    { slotKey = "5", slotLabel = "5" },
    { slotKey = "6", slotLabel = "6" },
    { slotKey = "7", slotLabel = "7" },
    { slotKey = "8", slotLabel = "8" },
    { slotKey = "K", slotLabel = "K" },
}

slotKey - used in key mapping slotLabel - used in Ui


CustomHotBarCss

Adjust the positioning of hotbar.

Config.CustomHotBarCss = {
    left = "50%",
    top = "95%",
    scale = 1.0,
    gap = "0.75vw",
    reverseRow = false,
    column = false,
}

Language Configuration (sh.lang.lua)

The language file contains all text strings used in the UI. Each string can be customized:

Config.Lang = {
    ['skill_select'] = "Skill select",
    ['skill_select_hotbar'] = "Skill select hotbar",
    ['confirm'] = "Confirm",
}

Framework File (s.framework.lua)

Set up your framework here for use within the isVisible function in Config.Abilities


Functions File (c.functions.lua)

Here, you can customize the behavior of the useRaycast function. Whole useRaycast function behaviour is open source.

useRaycast usage:

local maxDistance = 50
local coords, entity = useRaycast(maxDistance)
if not coords then return false end

Input:

If the coords returns false, it indicates that the user attempted to point at coordinates too far from their original location.

🎆
đŸ› ī¸
BUY SKILL TREE
đŸ’ĒSkill Tree connection