This script is compatible with TARGET (ox_target, qb-target) but TARGET is not mandatory. It is also compatible with any INVENTORY (qs-inventory, ox_inventory...)
Additionally, it is compatible with our MULTIJOB, which allows your players to have more than one job and switch between them
Don't ensure the script on the fly. It's better with a full server restart
INSTALLATION GUIDE
Download from KEYMASTER and Unzip the neon-boss.pack.zip and place this folder in your server's resource folder.
Add the resource to your server start config: ensure neon-boss,the name of the folder must not be changed or the resource will not function correctly. It should be located just below your core.
Delete or remove from your resources folder any other BOSS MENU you have.
Clear the cache of your server and also of your own FiveM.
Reboot the entire server with the forge script well ensured in your server.cfg.
CONFIG
The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.
Config = { }
-- _____ _____ _ _ ______ _____ _____ _ _______ ___ _____ _____ _____ _ _
-- / __ \ _ | \ | || ___|_ _| __ \ | | | ___ \/ _ \_ _|_ _| _ | \ | |
-- | / \/ | | | \| || |_ | | | | \/ | | | |_/ / /_\ \| | | | | | | | \| |
-- | | | | | | . ` || _| | | | | __| | | | /| _ || | | | | | | | . ` |
-- | \__/\ \_/ / |\ || | _| |_| |_\ \ |_| | |\ \| | | || | _| |_\ \_/ / |\ |
-- \____/\___/\_| \_/\_| \___/ \____/\___/\_| \_\_| |_/\_/ \___/ \___/\_| \_/
-- Framework selection: Define the game framework to be used, affecting core functionalities.
Config.Framework = 'qbcore' -- Options: 'esx', 'qbcore'
-- Database configuration: Specifies the MySQL wrapper for database interactions.
Config.SQLWrapper = 'oxmysql' -- Common choices include 'ghmattimysql', 'mysql-async', 'oxmysql'
-- Target system usage toggle. Enable or disable with true/false.
Config.UseTarget = true
Config.TargetSystem = 'qb-target' -- qb-target / ox_target
-- User Interface (UI) settings: Defines colors and texts for the Boss Menu.
Config.UI = {
color = '#ff0066', -- https://htmlcolorcodes.com/
secondColor = '#ff3d8b',
thirdColor = 'rgba(255, 0, 102, 0.25)',
fourthColor = 'rgba(255, 0, 102, 0.5)',
fifthColor = 'rgba(255, 0, 102, 0.3)',
translation = {
title1 = 'm<span>e</span>nu',
title2 = 'B<span>O</span>SS',
description = 'In this menu, as the head of a specific company, you can manage the company\'s money and the employees.',
withdraw1 = 'Withdraw',
deposit1 = 'Deposit',
mainmenu = 'Main Menu',
money1 = 'Money',
employee1 = 'Employee',
close1 = 'Close',
worksociety = 'WORK SOCIETY',
online1 = 'Online',
employee2 = 'Employee',
employees1 = 'EMPLOYEES',
monetarybalance1 = 'Monetary Balance',
offline1 = 'Offline',
employee3 = 'Employee',
employees2 = 'EMPLOYEES',
money2 = 'Money',
withdraw2 = 'Withdraw',
monetarybalance2 = 'Monetary Balance',
withdraw3 = 'Withdraw',
playerwithdrawer1 = 'Player Withdrawer',
date1 = 'Date',
reason1 = 'Reason',
amount1 = 'Amount',
money3 = 'Money',
deposit2 = 'Deposit',
monetarybalance3 = 'Monetary Balance',
depositmoney1 = 'Deposit Money',
depositingplayer = 'Depositing Player',
date2 = 'Date',
reason2 = 'Reason',
amount2 = 'Amount',
informationplayer1 = 'Information Player',
selectgrade1 = 'Select Grade',
saveinformation1 = 'Save Information',
fireemployee1 = 'Fire Employee',
sure1 = 'Sure?',
hiresomeone = 'HIRE SOMEONE',
selectgrade2 = 'Select Grade',
saveinformation2 = 'Save Information',
employeename1 = 'EMPLOYEE NAME',
employmentdate1 = 'EMPLOYMENT DATE',
grade1 = 'GRADE',
salary1 = 'SALARY'
}
}
-- Societies configuration: Defines settings for each society or business with a boss menu.
Config.Societies = {
['police'] = {
showMarker = true, -- True if you want a marker to appear, and false if you don't want it.
bossMenuCoords = vector3(448.15, -973.34, 30.69), -- Location for accessing the Boss Menu.
job = 'police', -- Job identifier for the society.
bossAccess = { 5, 4, 3, 2 }, -- Job grades allowed to access the Boss Menu.
storages = { -- Define multiple storages with access levels.
{ coords = vector3(448.8, -979.23, 30.69), access = { 5, 4, 3, 2 } },
{ coords = vector3(452.9861, -973.2086, 30.6896), access = { 1 } }
-- Add more storages as needed:
-- {coords = vector3(x, y, z), access = {jobGrades}},
}
}
-- Additional societies can be added here following the same structure.
}
-- Here will appear the open functions so you can adjust the system to the systems you put.
Config.Functions = {
OpenStorage = function(job) -- To open the warehouses.
-- QBCore Inventory
TriggerServerEvent('inventory:server:OpenInventory', 'stash', job..'_stash', { maxweight = 4000000, slots = 300 })
TriggerEvent('inventory:client:SetCurrentStash', job..'_stash')
-- OX Inventory
-- TriggerServerEvent('neon-boss:registerOxStash', job..'_stash', 'Boss Stash', 300, 4000000, false)
-- exports.ox_inventory:openInventory('stash', { id = job..'_stash' })
-- Quasar Inventory
-- exports['qs-inventory']:RegisterStash(job..'_stash', 300, 4000000)
end,
DrawMarker = function(coords) -- To change the design of the marker, in case you have it set to true.
DrawMarker(2, coords, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 0.4, 0.4, 0.4, 222, 186, 77, 255, true, true, 2, nil, nil, false)
end,
DrawText = function(text) -- To change the export or modify the Text UI of the floating text as you like.
AddTextEntry('ALERT_MESSAGE', text)
BeginTextCommandDisplayHelp('ALERT_MESSAGE')
EndTextCommandDisplayHelp(0, false, false, -1)
end,
Notify = function(text) -- Here put the export of the notification system you use.
if Config.Framework == 'esx' then
ESX.ShowNotification(text)
elseif Config.Framework == 'qbcore' then
QBCore.Functions.Notify(text)
end
end
}
-- In the Discord webhook you set up, a log will appear each time a boss withdraws/deposits money or hires/fires someone.
Config.DiscordWebhook = 'your_webhook'
-- The translations for the notifications and some other things.
Config.Translation = {
hire = 'You\'ve been hired as %s in the rank of %s.',
fire = 'You\'ve been fired from the %s job.',
deposit = 'You\'ve deposited $%s into the company.',
withdraw = 'You\'ve withdrawn $%s from the company.',
logstitle = 'New Boss Menu Log',
logsusername = 'Boss Menu Logs',
hirelog = '%s [%s] hired %s [%s] as %s in the rank of %s',
depositlog = '%s [%s] deposited $%s into the company of %s',
withdrawlog = '%s [%s] withdrawn $%s from the company of %s',
floatopenboss = 'Press ~INPUT_CONTEXT~ to open the boss menu',
floatopenstash = 'Press ~INPUT_CONTEXT~ to open the storage',
targetopenboss = 'Open Boss Menu',
targetopenstash = 'Open Boss Stash'
}