mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
update
This commit is contained in:
@@ -58,6 +58,21 @@ AddEventHandler('esx_society:getSociety', function(name, cb)
|
||||
cb(GetSociety(name))
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_society:checkSocietyBalance')
|
||||
AddEventHandler('esx_society:checkSocietyBalance', function(society)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local society = GetSociety(society)
|
||||
|
||||
if xPlayer.job.name ~= society.name then
|
||||
print(('esx_society: %s attempted to call checkSocietyBalance!'):format(xPlayer.identifier))
|
||||
return
|
||||
end
|
||||
|
||||
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
|
||||
TriggerClientEvent("esx:showNotification", xPlayer.source, TranslateCap('check_balance', ESX.Math.GroupDigits(account.money)))
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_society:withdrawMoney')
|
||||
AddEventHandler('esx_society:withdrawMoney', function(societyName, amount)
|
||||
local source = source
|
||||
@@ -336,7 +351,6 @@ ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job,
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
ESX.RegisterServerCallback('esx_society:setJobLabel', function(source, cb, job, grade, label)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user