From a47004767b7bed7474933a087fa7fb6f1a93dd7a Mon Sep 17 00:00:00 2001 From: renildomarcio Date: Tue, 31 Mar 2020 01:07:40 -0300 Subject: [PATCH] Update 1.0.5 Update 31.03.2020 --- .github/FUNDING.yml | 8 --- README.md | 21 ++++--- client/main.lua | 2 +- config.lua | 6 +- __resource.lua => fxmanifest.lua | 8 ++- locales/br.lua | 37 +++++------ locales/cs.lua | 37 +++++++++++ locales/nl.lua | 38 +++++++++++ server/main.lua | 104 +++++++++++++++---------------- 9 files changed, 165 insertions(+), 96 deletions(-) delete mode 100644 .github/FUNDING.yml rename __resource.lua => fxmanifest.lua (82%) create mode 100644 locales/cs.lua create mode 100644 locales/nl.lua diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 39643c7..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,8 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: esxbrasil -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -custom: # Replace with a single custom sponsorship URL diff --git a/README.md b/README.md index 7f34fe2..2bc1a0c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # esx_society -Gerenciamento de sociedade para o ESX. Adiciona gerenciamento de funcionários (contratar, demitir, promover / rebaixar, alterar salário), contas bancárias da sociedade e lavagem de dinheiro. É crucial que esse script seja iniciado antes que todos os recursos que utilizam as sociedades o façam, ou então muitas coisas darão errado. + +Gestão da sociedade para ESX. Adiciona gerenciamento de funcionários (contratar, demitir, promover / rebaixar, alterar salário), contas bancárias da sociedade e lavagem de dinheiro. É crucial que esse script seja iniciado antes que todos os recursos que utilizam as sociedades o façam; caso contrário, muitas coisas darão errado. ## Requisitos - [cron](https://github.com/ESX-Brasil/cron) @@ -9,10 +10,10 @@ Gerenciamento de sociedade para o ESX. Adiciona gerenciamento de funcionários ( ### Usando [fvm](https://github.com/qlaffont/fvm-installer) ``` -fvm install --save --folder=esx ESX-Brasil/esx_society +fvm install --save --folder=esx esx-brasil/esx_society ``` -### Usando o Git +### Usando Git ``` cd resources git clone https://github.com/ESX-Brasil/esx_society [esx]/esx_society @@ -23,17 +24,17 @@ git clone https://github.com/ESX-Brasil/esx_society [esx]/esx_society - Coloque no diretório `[esx]` ## Instalação -- Importe `esx_society.sql` para seu banco de dados -- Add isto em seu `server.cfg`: +- Importe `esx_society.sql` no seu banco de dados +- Adicione isso no seu `server.cfg`: ``` start esx_society ``` ## Explicação -A ESX Society trabalha com contas de addon chamadas 'society_xxx', por exemplo 'society_taxi' ou 'society_realestateagent'. Se o seu grau de emprego for 'chefe', o dinheiro da sociedade será exibido no seu hud. +A ESX Society trabalha com contas adicionais denominadas 'society_xxx', por exemplo 'society_taxi' ou 'society_realestateagent'. Se você classificar como chefe, o dinheiro da sociedade será exibido em seu hud. -## Uso +## Como usar ```lua local society = 'taxi' local amount = 100 @@ -45,18 +46,18 @@ TriggerServerEvent('esx_society:washMoney', society, amount) TriggerEvent('esx_society:openBossMenu', society, function (data, menu) menu.close() -end, {wash = false}) -- defina opções personalizadas, por exemplo, desativar a lavagem +end, {wash = false}) -- set custom options, e.g disable washing ``` # Discord -[![Join ESX Brasil](https://discordapp.com/api/guilds/432980396070666250/embed.png?style=banner2)](https://discord.gg/8zGbh3T) +[![Join ESX Brasil](https://discordapp.com/api/guilds/693468263161659402/embed.png?style=banner2)](https://discord.gg/ZGXTsdN) # Legal ### License esx_society - societies for ESX -Copyright (C) 2015-2018 Jérémie N'gadi +Copyright (C) 2015-2020 ESXBrasil This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/client/main.lua b/client/main.lua index e6ede08..e1d55c6 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,6 +1,6 @@ ESX = nil -local base64MoneyIcon = 'iVBORw0KGgo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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfZHJgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAGdUlEQVRoQ7WZ93sURRiAFZO76O1eklt215OgBwqJgmgCRhAhRrAAiogBK4gBJEFEgWAEYiGIYEGp1kjXQECkiF0OWyjJ/k34zcy3db7Zu8fHe3/KTXnzPbPT56orRTEYAhMLUFgNKkeiGH8BNaV1KWSPVXveU9s3LW9pvhdoblm+afspTHZi5Wo1BnzpaOfcnFmWSBv29YBtpBNlZm5u59FLPDsmdJUaxQeXNugZw5IwMnrD0oO8iFKuUHNx/+bGZLWNMgm7Otm4uZ/LsVIEUs3F+Y5a3USNAlOv7cgr5ZSamQffyOnKgH1sPdfFi2PVILKaReEcmKwVIWbY2uQDvApW95HULIb+Ng0rFoXWxppcCjyqZuZjk4oNWWBrk44R7oiamXdkC3w9GTO7Q3aH1cy8OkWFnHtitstM4j/bqdWSO6Rm5nYdS4e5FbKQwxlMC6G3Q1bIHVQz8+IKLBphJLdydlRjWpiKxZAXdAfUPOak4gOO4FZOdxWmhbGTkbh9NTOvoVsDuGmAaxkdlZgWRV8Dub7bV0PyzhQWkqk5z7WMdjpqILUTslEXUEPQJ7Lq7pz9WXiBZ4iZUGBnTwTCdtVgvjgxpj+b3vTvTEteq5KbEy/6blcNVZapR3cmdc9Z4QV6Pnxzdr1GF9aWQQFUohqCPqQc3ZV17X3C6tP31kyL+Jy2dsgLW6jBPDgVc6OkR3XxCV/i9IqRRFedylxc6qk30L3DNF7ikz1Jft0oLOaT2hBSg/l8jmwOo24/amimYzkfOwfdlLtdNT1YjIaf0EFzgGhuNnB8teNcqCWDvs3vzSSLqC9Ze0F0EqaGoDe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sz8vs0Mzs0c3t0tHu1dHu1tPv19Tv2NXv2dXw2dbw2tfw29jw3Nnx3drx3t7z4d/z4uD04+H05OP15eP15uT15uT15+X16OX26Of26en36+r37Ov37er47Ov47ez47e347u347+758PD58fD68fD68vL69PT79fX79vb79/b89vb89/f8+Pj9+fn9+vr9+/v++/v+/Pz+/P3+/f3+/v7//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfZHJgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAGdUlEQVRoQ7WZ93sURRiAFZO76O1eklt215OgBwqJgmgCRhAhRrAAiogBK4gBJEFEgWAEYiGIYEGp1kjXQECkiF0OWyjJ/k34zcy3db7Zu8fHe3/KTXnzPbPT56orRTEYAhMLUFgNKkeiGH8BNaV1KWSPVXveU9s3LW9pvhdoblm+afspTHZi5Wo1BnzpaOfcnFmWSBv29YBtpBNlZm5u59FLPDsmdJUaxQeXNugZw5IwMnrD0oO8iFKuUHNx/+bGZLWNMgm7Otm4uZ/LsVIEUs3F+Y5a3USNAlOv7cgr5ZSamQffyOnKgH1sPdfFi2PVILKaReEcmKwVIWbY2uQDvApW95HULIb+Ng0rFoXWxppcCjyqZuZjk4oNWWBrk44R7oiamXdkC3w9GTO7Q3aH1cy8OkWFnHtitstM4j/bqdWSO6Rm5nYdS4e5FbKQwxlMC6G3Q1bIHVQz8+IKLBphJLdydlRjWp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1roPVk/FDazbhjaryr0SiSw/R1oFll94sWNnfsLrzS1eTkawyjKrE6HcwyeVtIix3s6Dc4ljzsTbnx74P1na83+uf8ZBn5cb0tjgsbHJjlvoMa8dxWT4XBDZmoCa3k7eH9yE0u4l9jr+dZN2P2ASnVorK8TwoVwxsglnYxNY9852oHMseogMEt+4QtnzgGDoTa8eRH4ulA4QOHCxs6ZhUBdNAIS7NIjp1+JgEaulwZzwsnXCjDDxPzB+Rwx1zS0fSoVZb/Mp4/lFqQxk5kjI1cZDWa179HTUEe8eRW9XoQZq5qeN/5fCFigWmd14VNRXLx3/et8lLC7N8XNtH0VP6mXfvV+z4iEsLFrbqqkXXho2Z8dynwgo8NdZK0SXpqxbmjrsgquhCsXrhgOYgL4h4k8Rca5VvFV7gTkySUVxrsbBjLuOGfMy1jCZFa6gv47hbeYU4ZA/XMmbRy13MFaJwqy4+Ez1cy3iSVsddfGLcdJvo33Ato5VcSeOva4WbvmQ2v+daxkrqfqXQJbNwk1fj9kOPuNwlZxdxNS7c5IW+MdRFMhd3oS/cpXmG4EOnRI8nAAt8sKsETz4AK1yahyqAy0vxvAaU7lEQcJ8yj9BPmUf+81MmR8iB//kBllOyZ2NOqR67XUAVABNjuXLlX2rCcoFjOcGoAAAAAElFTkSuQmCC' Citizen.CreateThread(function() while ESX == nil do diff --git a/config.lua b/config.lua index 7e0ac7f..1eb625f 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,5 @@ Config = {} -Config.Locale = 'br' --traduções disponives br/en/fi/fr/pl/sv -Config.EnableESXIdentity = false --Ativar para pegar dados do player -Config.MaxSalary = 3500 --valor do salario do empregador. +Config.Locale = 'br' +Config.EnableESXIdentity = false +Config.MaxSalary = 3500 diff --git a/__resource.lua b/fxmanifest.lua similarity index 82% rename from __resource.lua rename to fxmanifest.lua index 1562e91..f53407a 100644 --- a/__resource.lua +++ b/fxmanifest.lua @@ -1,4 +1,6 @@ -resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' +fx_version 'adamant' + +game 'gta5' description 'ESX Society' @@ -13,6 +15,8 @@ server_scripts { 'locales/fr.lua', 'locales/sv.lua', 'locales/pl.lua', + 'locales/nl.lua', + 'locales/cs.lua', 'config.lua', 'server/main.lua' } @@ -25,6 +29,8 @@ client_scripts { 'locales/fr.lua', 'locales/sv.lua', 'locales/pl.lua', + 'locales/nl.lua', + 'locales/cs.lua', 'config.lua', 'client/main.lua' } diff --git a/locales/br.lua b/locales/br.lua index 43de9c2..70d5606 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -1,37 +1,38 @@ Locales['br'] = { - ['actions'] = 'ação', - ['boss_menu'] = 'menu do chefe', - ['money_generic'] = 'R$%s', + ['actions'] = 'ações', + ['boss_menu'] = 'menu chefe', + ['money_generic'] = '$%s', ['deposit_amount'] = 'valor do depósito', - ['deposit_society_money'] = 'dinheiro da sociedade de depósito', + ['deposit_society_money'] = 'depositar dinheiro da sociedade', ['do_you_want_to_recruit'] = 'você quer recrutar %s?', ['employee'] = 'empregado', - ['employee_list'] = 'Lista de empregados', + ['employee_list'] = 'lista de empregados', ['employee_management'] = 'gestão de funcionários', - ['fire'] = 'demitiu', - ['grade'] = 'grau', - ['have_deposited'] = 'você depositou ~r~R$%s~s~', - ['have_withdrawn'] = 'você retirou ~g~R$%s~s~', - ['invalid_amount'] = 'quantidade inválida', + ['fire'] = 'fogo', + ['grade'] = 'grau(escolaridade)', + ['have_deposited'] = 'você depositou ~r~$%s~s~', + ['have_withdrawn'] = 'você retirou ~g~$%s~s~', + ['invalid_amount'] = 'montante inválido', ['invalid_amount_max'] = 'esse salário não é permitido', ['no'] = 'não', ['promote'] = 'promover', - ['promote_employee'] = 'promoveu %s', + ['promote_employee'] = 'promover %s', ['recruit'] = 'recrutar', ['recruiting'] = 'recrutamento', ['salary_amount'] = 'valor do salário', ['salary_management'] = 'gestão salarial', ['wash_money'] = 'lavar dinheiro', - ['wash_money_amount'] = 'quantidade para lavar', + ['wash_money_amount'] = 'quantidade a lavar', ['withdraw_amount'] = 'retirar montante', - ['withdraw_society_money'] = 'sacar dinheiro da sociedade', + ['withdraw_society_money'] = 'retirar dinheiro da sociedade', ['yes'] = 'sim', - ['you_have'] = 'Você tem ~g~R$%s~s~ esperando a ~y~lavagem de dinheiro~s~ (pode demora 24h).', - ['you_have_laundered'] = 'Você tem ~r~lavado~s~ o seu dinheiro: ~g~R$%s~s~', + ['you_have'] = 'você tem ~g~$%s~s~ esperando lavagem de dinheiro (24h).', + ['you_have_laundered'] = 'você lavou ~g~$%s~s~ do seu dinheiro ', ['you_have_hired'] = 'você recrutou %s', ['you_have_been_hired'] = 'você foi contratado por %s', ['you_have_fired'] = 'você demitiu %s', - ['you_have_been_fired'] = 'você foi demitido %s', - ['you_have_promoted'] = 'você promoveu %s para %s', - ['you_have_been_promoted'] = 'você foi ~b~promovido~s~!', + ['you_have_been_fired'] = 'você foi demitido de %s', + ['you_have_promoted'] = 'você promoveu %s a %s', + ['you_have_been_promoted'] = 'você foi promovido ~b~promoted~s~!', } + diff --git a/locales/cs.lua b/locales/cs.lua new file mode 100644 index 0000000..46eb10a --- /dev/null +++ b/locales/cs.lua @@ -0,0 +1,37 @@ +Locales['cs'] = { + ['actions'] = 'akce', + ['boss_menu'] = 'akce šéfa', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'množství vkladu', + ['deposit_society_money'] = 'vložit peníze do společnosti', + ['do_you_want_to_recruit'] = 'chceš najmout %s?', + ['employee'] = 'zaměstnanec', + ['employee_list'] = 'seznam zaměstnanců', + ['employee_management'] = 'správa zaměstnanců', + ['fire'] = 'vyhodit', + ['grade'] = 'povýšit', + ['have_deposited'] = 'vložil jsi ~r~$%s~s~', + ['have_withdrawn'] = 'vybral jsi ~g~$%s~s~', + ['invalid_amount'] = 'neplatná částka', + ['invalid_amount_max'] = 'tento plat není povolen', + ['no'] = 'ne', + ['promote'] = 'povýšit', + ['promote_employee'] = 'povýšit %s', + ['recruit'] = 'najmout', + ['recruiting'] = 'najímání', + ['salary_amount'] = 'váše platu', + ['salary_management'] = 'správa platů', + ['wash_money'] = 'vyprat peníze', + ['wash_money_amount'] = 'množství na vyprání', + ['withdraw_amount'] = 'výběr peněz', + ['withdraw_society_money'] = 'vybrat peníze společnosti', + ['yes'] = 'ano', + ['you_have'] = 'máš ~g~$%s~s~ čekajících na vyprání~s~ (24h).', + ['you_have_laundered'] = '~r~Vypral jsi~s~ tvé peníze: ~g~$%s~s~', + ['you_have_hired'] = 'najmul jsi %s', + ['you_have_been_hired'] = 'byl jsi najmut hráčem %s', + ['you_have_fired'] = 'vyhodil jsi %s', + ['you_have_been_fired'] = 'byl jsi vyhozen hráčem %s', + ['you_have_promoted'] = 'byl jsi povýšen hráčem %s na %s', + ['you_have_been_promoted'] = 'byl jsi ~b~povýšen~s~!', +} diff --git a/locales/nl.lua b/locales/nl.lua new file mode 100644 index 0000000..c5aa601 --- /dev/null +++ b/locales/nl.lua @@ -0,0 +1,38 @@ +Locales['nl'] = { + ['actions'] = 'acties', + ['boss_menu'] = 'baas menu', + ['money_generic'] = '€%s', + ['deposit_amount'] = 'stort hoeveelheid', + ['deposit_society_money'] = 'stort maatschappij geld', + ['do_you_want_to_recruit'] = 'Wil je %s aannemen?', + ['employee'] = 'werknemer', + ['employee_list'] = 'werknemer lijst', + ['employee_management'] = 'werknemer beheer', + ['fire'] = 'ontslaan', + ['grade'] = 'schaal', + ['have_deposited'] = 'je hebt gestort ~r~$%s~s~', + ['have_withdrawn'] = 'je hebt opgenomen ~g~$%s~s~', + ['invalid_amount'] = 'ongeldige hoeveelheid', + ['invalid_amount_max'] = 'dit salaris is niet toegestaan', + ['no'] = 'nee', + ['promote'] = 'promoveer', + ['promote_employee'] = 'promoveer %s', + ['recruit'] = 'werv', + ['recruiting'] = 'werven', + ['salary_amount'] = 'salaris hoeveelheid', + ['salary_management'] = 'salaris beheer', + ['wash_money'] = 'witwas geld', + ['wash_money_amount'] = 'hoeveelheid om wit te wassen', + ['withdraw_amount'] = 'opneem hoeveelheid', + ['withdraw_society_money'] = 'neem maatschappelijk geld op', + ['yes'] = 'ja', + ['you_have'] = 'je hebt ~g~€%s~s~ staan in ~y~geld witwassen~s~ (24h).', + ['you_have_laundered'] = 'je hebt je geld: ~g~€%s~s~ ~r~witgewassen~s~ ', + ['you_have_hired'] = 'je bent gevraagt %s', + ['you_have_been_hired'] = 'je bent aangenomen door %s', + ['you_have_fired'] = 'je bent ontslagen %s', + ['you_have_been_fired'] = 'je bent ondslagen van %s', + ['you_have_promoted'] = 'je hebt gepromoveerd %s naar %s', + ['you_have_been_promoted'] = 'je bent ~b~gepromoveerd~s~!', +} + diff --git a/server/main.lua b/server/main.lua index ad8b4f1..9960b07 100644 --- a/server/main.lua +++ b/server/main.lua @@ -36,7 +36,7 @@ AddEventHandler('esx_society:registerSociety', function(name, label, account, da account = account, datastore = datastore, inventory = inventory, - data = data, + data = data } for i=1, #RegisteredSocieties, 1 do @@ -66,21 +66,20 @@ AddEventHandler('esx_society:withdrawMoney', function(society, amount) local society = GetSociety(society) amount = ESX.Math.Round(tonumber(amount)) - if xPlayer.job.name ~= society.name then + if xPlayer.job.name == society.name then + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + if amount > 0 and account.money >= amount then + account.removeMoney(amount) + xPlayer.addMoney(amount) + + xPlayer.showNotification(_U('have_withdrawn', ESX.Math.GroupDigits(amount))) + else + xPlayer.showNotification(_U('invalid_amount')) + end + end) + else print(('esx_society: %s attempted to call withdrawMoney!'):format(xPlayer.identifier)) - return end - - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - if amount > 0 and account.money >= amount then - account.removeMoney(amount) - xPlayer.addMoney(amount) - - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn', ESX.Math.GroupDigits(amount))) - else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_amount')) - end - end) end) RegisterServerEvent('esx_society:depositMoney') @@ -89,20 +88,19 @@ AddEventHandler('esx_society:depositMoney', function(society, amount) local society = GetSociety(society) amount = ESX.Math.Round(tonumber(amount)) - if xPlayer.job.name ~= society.name then - print(('esx_society: %s attempted to call depositMoney!'):format(xPlayer.identifier)) - return - end - - if amount > 0 and xPlayer.getMoney() >= amount then - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - xPlayer.removeMoney(amount) - account.addMoney(amount) - end) + if xPlayer.job.name == society.name then + if amount > 0 and xPlayer.getMoney() >= amount then + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + xPlayer.removeMoney(amount) + account.addMoney(amount) + end) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_deposited', ESX.Math.GroupDigits(amount))) + xPlayer.showNotification(_U('have_deposited', ESX.Math.GroupDigits(amount))) + else + xPlayer.showNotification(_U('invalid_amount')) + end else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_amount')) + print(('esx_society: %s attempted to call depositMoney!'):format(xPlayer.identifier)) end end) @@ -112,25 +110,23 @@ AddEventHandler('esx_society:washMoney', function(society, amount) local account = xPlayer.getAccount('black_money') amount = ESX.Math.Round(tonumber(amount)) - if xPlayer.job.name ~= society then - print(('esx_society: %s attempted to call washMoney!'):format(xPlayer.identifier)) - return - end + if xPlayer.job.name == society then + if amount and amount > 0 and account.money >= amount then + xPlayer.removeAccountMoney('black_money', amount) - if amount and amount > 0 and account.money >= amount then - xPlayer.removeAccountMoney('black_money', amount) - - MySQL.Async.execute('INSERT INTO society_moneywash (identifier, society, amount) VALUES (@identifier, @society, @amount)', { - ['@identifier'] = xPlayer.identifier, - ['@society'] = society, - ['@amount'] = amount - }, function(rowsChanged) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have', ESX.Math.GroupDigits(amount))) - end) + MySQL.Async.execute('INSERT INTO society_moneywash (identifier, society, amount) VALUES (@identifier, @society, @amount)', { + ['@identifier'] = xPlayer.identifier, + ['@society'] = society, + ['@amount'] = amount + }, function(rowsChanged) + xPlayer.showNotification(_U('you_have', ESX.Math.GroupDigits(amount))) + end) + else + xPlayer.showNotification(_U('invalid_amount')) + end else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_amount')) + print(('esx_society: %s attempted to call washMoney!'):format(xPlayer.identifier)) end - end) RegisterServerEvent('esx_society:putVehicleInGarage') @@ -241,7 +237,6 @@ ESX.RegisterServerCallback('esx_society:getJob', function(source, cb, society) cb(job) end) - ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, type) local xPlayer = ESX.GetPlayerFromId(source) local isBoss = xPlayer.job.grade_name == 'boss' @@ -253,11 +248,11 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier xTarget.setJob(job, grade) if type == 'hire' then - TriggerClientEvent('esx:showNotification', xTarget.source, _U('you_have_been_hired', job)) + xTarget.showNotification(_U('you_have_been_hired', job)) elseif type == 'promote' then - TriggerClientEvent('esx:showNotification', xTarget.source, _U('you_have_been_promoted')) + xTarget.showNotification(_U('you_have_been_promoted')) elseif type == 'fire' then - TriggerClientEvent('esx:showNotification', xTarget.source, _U('you_have_been_fired', xTarget.getJob().label)) + xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label)) end cb() @@ -277,10 +272,9 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier end) ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary) - local isBoss = isPlayerBoss(source, job) - local identifier = GetPlayerIdentifier(source, 0) + local xPlayer = ESX.GetPlayerFromId(source) - if isBoss then + if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then if salary <= Config.MaxSalary then MySQL.Async.execute('UPDATE job_grades SET salary = @salary WHERE job_name = @job_name AND grade = @grade', { ['@salary'] = salary, @@ -291,21 +285,21 @@ ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, local xPlayers = ESX.GetPlayers() for i=1, #xPlayers, 1 do - local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) + local xTarget = ESX.GetPlayerFromId(xPlayers[i]) - if xPlayer.job.name == job and xPlayer.job.grade == grade then - xPlayer.setJob(job, grade) + if xTarget.job.name == job and xTarget.job.grade == grade then + xTarget.setJob(job, grade) end end cb() end) else - print(('esx_society: %s attempted to setJobSalary over config limit!'):format(identifier)) + print(('esx_society: %s attempted to setJobSalary over config limit!'):format(xPlayer.identifier)) cb() end else - print(('esx_society: %s attempted to setJobSalary'):format(identifier)) + print(('esx_society: %s attempted to setJobSalary'):format(xPlayer.identifier)) cb() end end) @@ -364,7 +358,7 @@ function WashMoneyCRON(d, h, m) -- send notification if player is online if xPlayer then - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_laundered', ESX.Math.GroupDigits(result[i].amount))) + xPlayer.showNotification(_U('you_have_laundered', ESX.Math.GroupDigits(result[i].amount))) end MySQL.Async.execute('DELETE FROM society_moneywash WHERE id = @id', {