8000 GitHub - swkeep/keep-paycheck: Qbcore and ESX alternative paycheck system
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

swkeep/keep-paycheck

8000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependencies

Preview

Preview Video

Installation

For qb-core

  1. Edit qb-core/server/functions.lua
    (Make sure you have a backup of this file first)

  2. Replace the code in PaycheckInterval() with:

function PaycheckInterval()
    local pay_check_society = QBCore.Config.Money.PayCheckSociety

    if GetResourceState('keep-paycheck') == "started" and type(exports['keep-paycheck'].QbcorePaycheckHandler) == 'function' then
        exports['keep-paycheck']:QbcorePaycheckHandler(QBCore.Players, QBShared.Jobs, pay_check_society)
    else
        warn("keep-paycheck is not started!")
    end
    SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), PaycheckInterval)
end

For ESX

  1. Uncomment ox_lib from fxmanifest.lua:

    shared_scripts {
        "@ox_lib/init.lua", --- this line 
        'locale/locale.lua',
        'locale/en.lua',
        'shared.config.lua',
    }
  2. Set the following values to ox_lib:

    • Config.menu
    • Config.input
  3. Set the Config.target_system to ox_target

  4. Edit es_extended/server/modules/paycheck.lua (Make sure you have a backup of this file first)

  5. Replace the code in StartPayCheck() with:

function StartPayCheck()
    CreateThread(function()
        while true do
            Wait(Config.PaycheckInterval)

            local society_payouts = Config.EnableSocietyPayouts
            local Offduty_multiplier = Config.OffDutyPaycheckMultiplier

            if GetResourceState('keep-paycheck') == "started" and type(exports['keep-paycheck'].ESXPaycheckHandler) == 'function' then
                exports['keep-paycheck']:ESXPaycheckHandler(ESX.Players, society_payouts, Offduty_multiplier)
            else
                warn("keep-paycheck is not started!")
            end
        end
    end)
end

About

Qbcore and ESX alternative paycheck system

Topics

Resources

License

Stars

Watchers

Forks

Languages

0