Handles all the storage and society logic for jobs and gangs
Make sure to add your additional job societies to the management_funds table in the database!
Preview
Configuration
Boss menu
Config.BossMenus = { -- if target not enabled ['police'] = { -- job namevector3(461.45, -986.2, 30.73), -- location for distance checking },}Config.BossMenuZones = { -- if target is enabled ['police'] = { -- job name { -- polyzone box information coords =vector3(461.45, -986.2, 30.73), length =0.35, width =0.45, heading =351.0, minZ =30.58, maxZ =30.68 }, },}
Gang menu
Config.GangMenus = { -- if target not enabled ['lostmc'] = {vector3(0, 0, 0), -- location for distance checking },}Config.GangMenuZones = { -- if target is enabled ['gangname'] = { -- gang name { -- polyzone box information coords =vector3(0.0, 0.0, 0.0), length =0.0, width =0.0, heading =0.0, minZ =0.0, maxZ =0.0 }, },}
Server exports
All examples are done on the SERVER side!
AddMoney
RegisterCommand('testaddmoney, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal job = Player.PlayerData.job.name exports['qb-management']:AddMoney(job, 500) -- Add $500 to society accountend)
AddGangMoney
RegisterCommand('testaddgangmoney, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal gang = Player.PlayerData.gang.name exports['qb-management']:AddGangMoney(gang, 500) -- Add $500 to societyend)
RemoveMoney
RegisterCommand('testremovemoney, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal job = Player.PlayerData.job.name exports['qb-management']:RemoveMoney(job, 500) -- Remove $500 society accountend)
RemoveGangMoney
RegisterCommand('testremovegangmoney, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal gang = Player.PlayerData.gang.name exports['qb-management']:RemoveGangMoney(gang, 500) -- Remove $500 societyend)
GetAccount
RegisterCommand('testgetaccount, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal job = Player.PlayerData.job.namelocal society = exports['qb-management']:GetAccount(job)print(society) -- if society exists prints balance else prints 0end)
GetGangAccount
RegisterCommand('testgetgangaccount, function(source)local Player = QBCore.Functions.GetPlayer(source)ifnot Player thenreturnendlocal gang = Player.PlayerData.gang.namelocal society = exports['qb-management']:GetGangAccount(gang)print(society) -- if society exists prints balance else prints 0end)