Paychecks!

This commit is contained in:
WLVF
2022-09-01 04:07:40 -04:00
parent 140bbcb06b
commit 803727e4e0
2 changed files with 32 additions and 6 deletions

View File

@@ -63,4 +63,20 @@ AddEventHandler("ND_CharacterSelection:checkPerms", function()
end
end
TriggerClientEvent("ND_CharacterSelection:permsChecked", player, allowedRoles)
end)
end)
if config.departmentPaychecks then
CreateThread(function()
while true do
Wait(config.paycheckInterval * 60000)
for player, playerInfo in pairs(NDCore.Functions.GetPlayers()) do
local salary = config.departmentSalaries[playerInfo.job]
NDCore.Functions.AddMoney(salary, player, "bank")
TriggerClientEvent("chat:addMessage", player, {
color = {0, 255, 0},
args = {"Salary", "Received $" .. salary .. "."}
})
end
end
end)
end