EXPORTS
Exports that you can use to make your scripts compatible with NEON BOSS MENU
ALL THE EXPORTS BELOW ARE CLIENT SIDE ONLY
OpenBossMenu -> This export allows the opening of the boss menu for a specified job or gang. It verifies the player's access rights and opens the menu accordingly.
Export Syntax:
exports['neon-boss']:OpenBossMenu(job, _type)
Parameters:
job (string): The job or gang name for which the boss menu will be opened.
Example:
'police'
,'mafia'
, etc.
_type (string): Specifies whether the entity is a society or a gang. Accepts values:
"society"
: To open the boss menu for a job-related society."gang"
: To open the boss menu for a gang.
Functionality:
The function checks the current framework defined in
Config.Framework
(esx
orqbcore
) and retrieves the player's data using eitherESX.GetPlayerData()
orQBCore.Functions.GetPlayerData()
.If
_type
is"society"
, it looks up the society inConfig.Societies
and checks if the player has the necessary boss-level access for that job.If
_type
is"gang"
, it checksConfig.Gangs
to ensure the player has the appropriate boss-level access for that gang.If the player meets the access requirements, the
OpenBossMenu
function is called with the job or gang name.
Example Usage:
-- Open the boss menu for the 'police' society
exports['neon-boss']:OpenBossMenu('police', 'society')
-- Open the boss menu for the 'ballas' gang
exports['neon-boss']:OpenBossMenu('ballas', 'gang')
ALL THE EXPORTS BELOW ARE SERVER SIDE ONLY
GetSocietyData -> This export will return the society data
exports['neon-boss']:GetSocietyData(job)
Example:
local data = exports['neon-boss']:GetSocietyData('police')
print(data.balance)
RemoveSocietyMoney -> This export will remove money from the society
exports['neon-boss']:RemoveSocietyMoney(job, sender, amount, reason)
Example:
exports['neon-boss']:RemoveSocietyMoney('police', 'Jack', 5000, 'Transfer')
AddSocietyMoney -> This export will add money to the society
exports['neon-boss']:AddSocietyMoney(job, sender, amount, reason)
Example:
exports['neon-boss']:AddSocietyMoney('police', 'Jack', 5000, 'Deposit')
Last updated