| If you are intested in recieving github updates join the community on Discord! |
esx_society > server.lua
RegisterServerEvent('esx_society:depositMoney:src-billing')
AddEventHandler('esx_society:depositMoney:src-billing', function(societyName, amount)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to non-existing society - ^5%s^7!'):format(source, societyName))
return
end
amount = ESX.Math.Round(tonumber(amount))
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
account.addMoney(amount)
end)
end)