wow bro,very nice.
Thank you!
Love it
Nice one
<3
Thanks !
Just sharing this in case others need.
es_extended\server\paycheck.lua (ESX Legacy)
StartPayCheck = function()
function payCheck()
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
local job = xPlayer.job.grade_name
local salary = xPlayer.job.grade_salary
if salary > 0 then
if job == 'unemployed' then -- unemployed
--xPlayer.addAccountMoney('bank', salary)
TriggerEvent('dx-paycheck:AddMoneyEs_Extended',xPlayer, salary)
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_help', salary), 'CHAR_BANK_MAZE', 9)
elseif Config.EnableSocietyPayouts then -- possibly a society
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
if society ~= nil then -- verified society
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function (account)
if account.money >= salary then -- does the society money to pay its employees?
--xPlayer.addAccountMoney('bank', salary)
TriggerEvent('dx-paycheck:AddMoneyEs_Extended',xPlayer, salary)
account.removeMoney(salary)
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
else
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), '', _U('company_nomoney'), 'CHAR_BANK_MAZE', 1)
end
end)
else -- not a society
--xPlayer.addAccountMoney('bank', salary)
TriggerEvent('dx-paycheck:AddMoneyEs_Extended',xPlayer, salary)
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
end
end)
else -- generic job
--xPlayer.addAccountMoney('bank', salary)
TriggerEvent('dx-paycheck:AddMoneyEs_Extended',xPlayer, salary)
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
end
end
end
SetTimeout(Config.PaycheckInterval, payCheck)
end
SetTimeout(Config.PaycheckInterval, payCheck)
end
Thats only for es_extended 1.1 btw
did you get mythic notify to work with it?
You have to check which version of the Mythic Notify you have, if youāre using SendAlert or DoHudText
cant get the bt target to go active on the NPC in city hall.
Been trying to figure it out, but cant. any help would be great, really love the idea of this system.
i recommend to use qtarget, thats who worked for me, but you can also do it if you start the script before the bt-target start
I cant beleive this is Freeā¦
I cant beleive this is Free⦠Also Bro whats that Notification system you are using very neat and clean.
Unfortunately, it wasnāt my server were I tested it, so I donāt really know thatās the notification system
I could never get this to work with bt and havent moved over to QT, so i added draw text to this. Works flawless, appreciate the work!
Sadly, i didnāt get this to work with bt too, i created a version with ShowHelpNotification tho, i should update that version
id be interested to see, cause i couldnt get it to work BT either, tried QT but still had some troubles so used draw text.
is there a non target version ?
my version ive redone is not using target.
can you send it to me ?
ya give me a bit