mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
Remove paycheckloop function from QBCore table
This commit is contained in:
+7
-10
@@ -1,16 +1,13 @@
|
||||
QBCore.Functions.StartPayCheck = function()
|
||||
GivePayCheck = function()
|
||||
local Players = QBCore.Functions.GetPlayers()
|
||||
PaycheckLoop = function()
|
||||
local Players = QBCore.Functions.GetPlayers()
|
||||
|
||||
for i=1, #Players, 1 do
|
||||
local Player = QBCore.Functions.GetPlayer(Players[i])
|
||||
for i=1, #Players, 1 do
|
||||
local Player = QBCore.Functions.GetPlayer(Players[i])
|
||||
|
||||
if Player.PlayerData.job ~= nil and Player.PlayerData.job.payment > 0 then
|
||||
Player.Functions.AddMoney('bank', Player.PlayerData.job.payment)
|
||||
TriggerClientEvent('QBCore:Notify', Players[i], "You received your paycheck of $"..Player.PlayerData.job.payment)
|
||||
end
|
||||
if Player.PlayerData.job ~= nil and Player.PlayerData.job.payment > 0 then
|
||||
Player.Functions.AddMoney('bank', Player.PlayerData.job.payment)
|
||||
TriggerClientEvent('QBCore:Notify', Players[i], "You received your paycheck of $"..Player.PlayerData.job.payment)
|
||||
end
|
||||
SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), GivePayCheck)
|
||||
end
|
||||
SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), GivePayCheck)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user