mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 13:56:02 +01:00
Paychecks!
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user