Skip to content

Possible Skill Menu - ox_lib Skill Menu that users Qb-Core Player Meta Data

Notifications You must be signed in to change notification settings

ashleyjrobinson/possible-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Possible Skill Menu

Here's a simple Skill Menu which uses ox_lib context menu that allows you to create skills through QB-Core Player Meta Data and display the skills/ reputation through this menu.

Example Useage:

  • Add any meta data (skills) you want into qb-core/server/player.lua

PlayerData.metadata['drugrep'] = PlayerData.metadata['drugrep'] or 0 -- Drug Manufacturing

  • Add checks for the players meta data (client side example)

if QBCore.Functions.GetPlayerData().metadata['drugrep'] >= 1000 -- If Drug Manufacturing is equal to or greater than 10

  • Add 50 XP through export for completion of task

exports['possible-skillmenu']:XP(1, 'drugrep', 50)

You can see how the above was used in the /client/main.lua and the config, to add more simply duplicate both and edit accordingly, I've made this very configurable for ease of use to others.

  • Add trigger to radial menu (qb-radial example)
id = 'skills',
title = 'Skills',
icon = 'chart-bar',
type = 'client',
event = 'possible-skillmenu:client:SkillMenu',
shouldClose = true

Notes

The way I've set this up is that 100xp is 1 level, this doesn't increment for levels, but if required you could always give less xp based off the player level or edit accordingly for your needs with it being open-source.

Support:

Join my Discord for support and roles.

https://discord.gg/5VU8MA7Tkz

Credit: I was originally using - https://github.com/boiidevelopment/boii-skillsmenu-qb on my server before moving to more overextended resources, so I took inspiration from there and expanded upon it to use ox_lib menu.

About

Possible Skill Menu - ox_lib Skill Menu that users Qb-Core Player Meta Data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages