So I got one problem…
The problem is that I can’t seem to get the company money to show in the boos menu.
Example:
Menu1
-> Show company money
-> Amount (the amount that that company has made from example moddding cars, billing people trough the ambluance job and stuff)
I want to apply this to Macanojob and ambulancejob for example.
Does anyone have a clue on how I add that to the menu?
FIX:
Sure,
In esx_society/client/main.lua on line 35, add a new default option called “money” like so:
Right under the code local defaultOptions in client.lua you will find the line: if options.withdraw then
add this line over:
if options.money then
table.insert(elements, {label = 'Check company money', value = 'check_money'})
end
This last bit of code, add it after the manage_employees end tag right around line 162-163:
if data.current.value == 'check_money' then
ESX.TriggerServerCallback('esx_society:getSocietyMoney', function(money)
ESX.ShowNotification('Your company now has ' .. money .. ' $')
end, PlayerData.job.name)
end
I can’t seem to get this work.
I have added all the parts in the main.lua file, it shows in the menu. I can deposit and withdraw the money, however if I select Check money, I receive no notifications.
Could you please assist me with this? If needed, I can send of the file as well.
I looked over your script and the code seems different from the latest version that I’m using.
So I tried copying again, however some parts in the Pastcode were remove if you overlook it.
I added it, but still, it doesn’t do anything. Withrawing and other stuff ir working just fine, but checking isn’t.
Feels like I’m missing something.
if options.showmoney then
ESX.TriggerServerCallback('esx_society:getSocietyMoney', function(money)
local formattedMoney = _U('money_generic', money)
table.insert(elements, {label = ('Funds: ' ..formattedMoney), value = 'money'} )
end)
end