搜索
查看: 145|回复: 1
收起左侧

[有效回答] 请帮我汉化一下

[复制链接]

升级进度: 31%

菠萝凯 发表于 2024-4-29 22:11:42 | 显示全部楼层 |阅读模式
yirvaxmxzaahzjsenjmpmnreymfxcazb

uqkxvuziimvxfqancvjfnvrdqx
local Framework = require('server.utils')vbftupmfytkfxivmgiwoeczlzibvxggshmmbbzh
local resourceName = GetCurrentResourceName()xwblylcbcmljkzoggwxowqbgffhaxenvaohzajac
local CreditScores = {}
  • rpopicsxcggwulpuyemeikap

  • jdewjhdjwzzjaqaobkqjbfzpaxjazufixj
    local function saveCreditScores()
    bugqdspzyznggvbmackogwwfzfzkmbqnvwe

        SaveResourceFile(resourceName, 'credit_scores.json', json.encode(CreditScores), -1)https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T
    endlxqfneytwtevmkzlrwnhlovvalijmumy
    https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
    local function loanPaidLoop()https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T
        local data = MySQL.query.await('SELECT * FROM players_loan WHERE status = 1', {})uqkxvuziimvxfqancvjfnvrdqx
        for k, v in pairs(data) dohttps://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
            local loanDetails = json.decode(v.loan_details)https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
            for _, duesdata in pairs(loanDetails.dues) do
    https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M

                if not duesdata.paid then
  • oqpxkbxuvuzjk

  •                 if os.time() >= duesdata.time thenimgjfbzebszskvdfybraclnuaiej
                        local hasRemoved = Framework:RemoveMoneyByIdentifier(v.citizenid, 'bank', tonumber(duesdata.amount),
    ztvwebhzlokkosimhnidaqb

                            "banker-loan")
    dpvwfujztebs

                        if not hasRemoved theneuigcjqfxigfdiutinjzqmmvfzbhukqyfzeiiv
                            Framework:RemoveMoneyByIdentifierOffline(v.citizenid, tonumber(duesdata.amount))
    ptyntmuzhwlhywwfstksyjckktygpcfewdsppmoxiafhwcmpv

                        endhttps://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F?pwd=efg0
                        if Config.CreditScore.Enable thenhttps://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C
                            HandleScores(v.citizenid, "remove", tonumber(duesdata.amount))elfbnamcausu
                        endwcndiyjkfdribdbcskuayqu
                        duesdata.paid = truehttps://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
                        MySQL.Async.execute('UPDATE players_loan SET status = ? , loan_details = ? WHERE loan_id = ?',

    https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G


                            { 3, json.encode(loanDetails), v.loan_id })
    https://pan.baidu.com/s/4N5O7P8Q9R0S1T2U3V4W

                    end
    yayqwamaqaqbvnhyftbwborgazfzvieuj

                end
  • https://pan.baidu.com/s/6O7P8Q9R0S1T2U3V4W5X

  •         endhttps://pan.baidu.com/s/6P8Q9R0S1T2U3V4W5X6Y
        end
    https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1

        SetTimeout(Config.LoanIntervals, loanPaidLoop)https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
    endroxarsdnisg
    https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
    AddEventHandler('txAdmin:events:serverShuttingDown', function()
  • avzswgzmrtlxksffiwvssaityotvizuivuasaafrurpejvkrrg

  •     saveCreditScores()jexdchbhsjhdthjmwqggaxhyoepvdylndirfpsnibu
    end)https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
    xckrxacuwwuffgbdmrd
    AddEventHandler('onResourceStart', function(resourceName)哈哈
        if (GetCurrentResourceName() ~= resourceName) thenhttps://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
            returnhttps://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
        enduyiamespupbssljpmmjjidonjprwhuvctecfivvckxvdjesvqb
        if Config.AutomaticDeduction then
  • kqyiiohtegjmzqkyhcgqmvkhqwfsqzua

  •         Wait(5000)kafsogukjqaxrxrhzj
            loanPaidLoop()https://pan.baidu.com/s/3V4W5X6Y7Z8A9B0C1D2E
        end                                   --启动扣除贷款付款的循环https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
        if Config.PhoneMails.DueReminder then -- 启动循环以在脚本重启时发送贷款还款提醒https://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D?pwd=yza8
            local data = MySQL.query.await('SELECT * FROM players_loan WHERE status = 1', {})ihrhmjulcb
            for k, v in pairs(data) dohzprbjroyhpqcstjffyhccu
                local loanDetails = json.decode(v.loan_details)https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R
                for _, duesdata in pairs(loanDetails.dues) dojpzejyfxdswambzrngqpjj
                    if not duesdata.paid then
    https://pan.baidu.com/s/5G6H7I8J9K0L1M2N3O4P

                        if os.time() >= (duesdata.time - (Config.PhoneMails.Time * 24 * 60 * 60)) and os.time() < duesdata.time thenhttps://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B?pwd=tuv6
                            -- convert dues.time into date
    https://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A

                            local date = os.date("%d-%m-%Y %H:%M:%S", duesdata.time)ubnvfeihvfmpoakdwriqmfu
                            local maildata = {
    yayqwamaqaqbvnhyftbwborgazfzvieuj

                                sender = "Banker",https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
                                subject = "#" .. v.loan_id .. " Loan Payment Reminder",https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
                                message = "You have a loan payment due . Please visit the bank to pay your loan before " ..https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
                                    date .. ". Payment Amount : $" .. duesdata.amount .. ". ",
    fgeolecufrsrbaggui

                            }
    ztvwebhzlokkosimhnidaqb

                            Framework:SendMail(v.citizenid, maildata)

    yxsljwmnkodwbepydwhzeohttps://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G


                        endildcsksnhootidblgyelciqnm
                    end

    https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl


                endtvwtgaqxihknbttfbvjtnimucmfgtlomhlfol
            end
    https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K

        endqqrqmwkmuyaalu
    end)https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
  • https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl

  • AddEventHandler('onResourceStop', function(res)deyxtrkyghcgrlvslbfisezheriymlfppemi
        if res ~= resourceName then return endlxqfneytwtevmkzlrwnhlovvalijmumy
        saveCreditScores()
    https://pan.baidu.com/s/9S1T2U3V4W5X6Y7Z8A9B

    end)eqxtkradyo
    https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S

    CreateThread(function()xoflyrbahvn
        Wait(100)
    nlclorurxptktblygatwszhmaiuqer

        local scores = json.decode(LoadResourceFile(resourceName, 'credit_scores.json'))vcwhymnfnlmlzrbvvah
        if type(scores) == 'table' thenhttps://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
            CreditScores = scorespnxloydaqmnbiahtqfusz
        elsehttps://pan.baidu.com/s/6O7P8Q9R0S1T2U3V4W5X?pwd=hij2
            SaveResourceFile(resourceName, "credit_scores.json", '[]', -1)https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
            CreditScores = {}tvwtgaqxihknbttfbvjtnimucmfgtlomhlfol
        end
    yayqwamaqaqbvnhyftbwborgazfzvieuj

    end)
    kuygqgiupqqkveqbyfawtg

    https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
    function GetScores(cid)lkrfqjgzrgymditmuppyheinrkvhiv
        if not CreditScores[cid] then return 0 end
    https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3

        return CreditScores[cid]zbseskwulcafkjmxxdwrcywhemsr
    end
    ykejginvwisfouwozfxiqkguwkcaylnwwsfcatyxb

  • nyndcuwehkertwmfgwoitutuemzyoekbcyffscka

  • function HandleScores(cid, operation, amount)
    ikcshvfgfkilsuztrnproibprfpyvztejwwqsbxxmfieaiy

        local score = 0https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
        -- Define the scoring rules based on the operation
    https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J

        local scoringRules
  • gmoqztzceefpkmuz

  •     if operation == "add" then
    hllrxksgldrwodytcxlmlqhqxbzqtfabqlsnvk

            scoringRules = Config.CreditScore.Addon
    https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H

        elseif operation == "remove" then
  • kqyiiohtegjmzqkyhcgqmvkhqwfsqzua

  •         scoringRules = Config.CreditScore.Deducthttps://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
        endhttps://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
        -- Loop through scoring rules to calculate the score
  • ifjywfbgusstnoehnziocuvpkvpncfbllkjipkpkd

  •     for k, v in pairs(scoringRules) dokquisuvmorqiatv
            local nextKey = next(scoringRules, k) -- Get the next keyagvllesfvjwyzcrewxxxtmdcpgbddbidie
            local currentRange = scoringRules[k]https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
            if nextKey then
    hllrxksgldrwodytcxlmlqhqxbzqtfabqlsnvk

                local nextRange = scoringRules[nextKey]https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
                -- Check if 'amount' is within the current rangeucupopwnjqocydoicgvbmdibfepuqrfkuaaiqww
                if amount >= currentRange.amount and amount < nextRange.amount then
    https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H

                    score = currentRange.scorelkrfqjgzrgymditmuppyheinrkvhiv
                    break -- Exit the loop since we found the correct range
    lwpstpgocwanvy

                end
  • prvcjprlyuwluyubbdlgnpzzdhq

  •         elsehttps://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
                -- If there is no next key, it means 'amount' is greater than or equal to the last rangehttps://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
                if amount >= currentRange.amount thenswgzaedatmdjpewtxlocanstobickmzcjgcjkfjesmnhrjbo
                    score = currentRange.score

    gcdntaxyzpuvdfhhgfzdwbtpfwhbtbhzdlmhttps://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn


                    break不要乱来哦
                end
  • https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx

  •         endhttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
        endhttps://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
        -- Update the player's credit scorevbftupmfytkfxivmgiwoeczlzibvxggshmmbbzh
        if operation == "add" then

    https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1


            CreditScores[cid] = (CreditScores[cid] or 0) + score
    https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl

        else
    aernahfelmybthmbhnenmvikiumhihgilywmfcrqopsixekeso

            CreditScores[cid] = (CreditScores[cid] or 0) - score
  • lrzpnucdercib

  •         if CreditScores[cid] < 0 then
    https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q

                CreditScores[cid] = 0ahinnrtoqxqjxitsmyqnqrpcekcnommptuchmvwcsmmpufhhey
            endmuolfxstrrtrkocqigzhfc
        endihrhmjulcb
        saveCreditScores()

    nunfqeoowxjzotduicnjgdhanyarxpvljhttps://pan.baidu.com/s/8R0S1T2U3V4W5X6Y7Z8A


    endhttps://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr

    https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0 https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1


    lib.callback.register('loan-system:server:getLoans', function(source)
  • lrzpnucdercib

  •     local data = MySQL.query.await('SELECT * FROM players_loan', {})https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
        local returnData = {https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
            Pending = {},bcnayqnstpymuzvcyldnwssphyasacybemc
            Approved = {},dqzjfswotrapuwwtjkyxvlivckrxkygnogwuy
            Rejected = {},https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
            Paid = {},https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5
            All = {}
  • scsdqjyihnbrgcdfjezgwynjyvepavfsxywoiuwpiyh

  •     }
  • xgppychbywgarfxxnygifvywljqsxx

  •     for k, v in pairs(data) dohttps://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B?pwd=tuv6
            if v.status == 0 then
    kuygqgiupqqkveqbyfawtg

                table.insert(returnData.Pending, v)
    qzoiljukqwfpymdkijjlsmt

            elseif v.status == 1 thenihrhmjulcb
                table.insert(returnData.Approved, v)
    ahzwcmtdcgseaihyqbpkoetpglkcb

            elseif v.status == 2 thenlxqfneytwtevmkzlrwnhlovvalijmumy
                table.insert(returnData.Rejected, v)vfixfjvvdrohtbnzviavqhmyuvtfyuyuahsgrnbvfqdzr
            elseif v.status == 3 thenjgiskmjbhxaqnusnrnmjyounxoigzcpijxbtk
                table.insert(returnData.Paid, v)
    txcyjjpegywbzibhedzsjyta

            end
  • https://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh

  •         table.insert(returnData.All, v)https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
        endslyzhdbspqhxhjbvcurypyjputteayqskpsrttki
        for _, statusData in pairs(returnData) do
  • https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4

  •         for _, loanDetails in pairs(statusData) do
  • edlwahtzwfdqdejdkzenlknxywlzrriwutsub

  •             local loanDetailsDecoded = json.decode(loanDetails.loan_details)dbthbfffabnlulcvkmwscexhyyqfxaaactieznjapxmjio
                if loanDetailsDecoded.starttime thenhttps://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
                    local starttime = os.date("%c", tonumber(loanDetailsDecoded.starttime))
  • lrzpnucdercib

  •                 loanDetailsDecoded.convertedstarttime = starttimehttps://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
                end

    https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0

  • 不要乱来哦

  •             if loanDetailsDecoded.endtime then
    https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6

                    local endtime = os.date("%c", tonumber(loanDetailsDecoded.endtime))ildcsksnhootidblgyelciqnm
                    loanDetailsDecoded.convertedendtime = endtime

    https://pan.baidu.com/s/2L3M4N5O7P8Q9R0S1T2U https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc


                endildcsksnhootidblgyelciqnm
                if loanDetailsDecoded.requestedtime then
    dpvwfujztebs

                    local requestedtime = os.date("%c", tonumber(loanDetailsDecoded.requestedtime))https://pan.baidu.com/s/4W5X6Y7Z8A9B0C1D2E3F
                    loanDetailsDecoded.convertedrequestedtime = requestedtimehttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
                endhttps://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
                if loanDetailsDecoded.dues then

    https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2 https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6


                    for _, duesdata in pairs(loanDetailsDecoded.dues) dovpatfzivaasmsjm
                        if duesdata.time then

    qqtlwmktbogpnpxepziuxatyjqgjuxhttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd


                            local time = os.date("%c", tonumber(duesdata.time))https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C
                            duesdata.convertedtime = time

    vojkxkzoqonmnhqxennwpkuhttps://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5


                        end
    ppeirgqnrnmmfdsfrrhgwzhcqzpn

                    endhttps://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
                endaofjrwrjyrivdrjdgozs
                loanDetails.loan_details = json.encode(loanDetailsDecoded)https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
            endvnflqxabukchzunvjn
        endhttps://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
        return returnDatahjlovvygjzopxeuzljzwdqntyiobvmacvmrrhpyqomflrzlcjl
    end)https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K
    https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L
    lib.callback.register('loan-system:server:getMyLoans', function(source)
    lwpstpgocwanvy

        local Player = Framework:GetPlayer(source)https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
        local cid = Player.citizenidhttps://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5
        local data = MySQL.query.await('SELECT * FROM players_loan WHERE citizenid =?', { cid })goyrsjnbtowfxhfsyppathvawlfvpujvjhmbqzcjn
        for _, statusData in pairs(data) dohbcildkcdstlyukqdhbqylnwletq
            local loanDetailsDecoded = json.decode(statusData.loan_details)

    nbmhauvbphcsdojvvytmngszxskabwzpxmwxgrzwzbocpyykwrhttps://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4


            if loanDetailsDecoded.starttime thenhttps://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
                local starttime = os.date("%c", tonumber(loanDetailsDecoded.starttime))
    https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P

                loanDetailsDecoded.convertedstarttime = starttimektkebxmpkunxfhxdhjauovszkquz
            endhttps://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
            if loanDetailsDecoded.endtime thengglgbgugcylsapjsinvtdhooxsg
                local endtime = os.date("%c", tonumber(loanDetailsDecoded.endtime))https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
                loanDetailsDecoded.convertedendtime = endtimelkrfqjgzrgymditmuppyheinrkvhiv
            endhttps://pan.baidu.com/s/6Q7R8S9T0U1V2W3X4Y5Z
            if loanDetailsDecoded.requestedtime then

    https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2

    https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K


                local requestedtime = os.date("%c", tonumber(loanDetailsDecoded.requestedtime))iodivxmpkgitoabnylrt
                loanDetailsDecoded.convertedrequestedtime = requestedtime
    https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1

            end
    txcyjjpegywbzibhedzsjyta

            if loanDetailsDecoded.dues then
    https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V

                for _, duesdata in pairs(loanDetailsDecoded.dues) dohttps://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
                    if duesdata.time thenhttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
                        local time = os.date("%c", tonumber(duesdata.time))
    https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y

                        duesdata.convertedtime = timektkebxmpkunxfhxdhjauovszkquz
                    endhttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
                endgeujcucpcntjzosrnrdwpfbuzwfhbjvhoqrqktgnh
            endhttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
            statusData.loan_details = json.encode(loanDetailsDecoded)
    eglxybewbxxewzjjbmmrhj

        endhttps://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
        return data
    qhcakpgqydoxablgmhwfbllpoiqcdottwvugkawjekge

    end)
    ikcshvfgfkilsuztrnproibprfpyvztejwwqsbxxmfieaiy

    kizbcgyqvynlbyov
    lib.callback.register('loan-system:server:getMyScores', function(source)muolfxstrrtrkocqigzhfc
        local Player = Framework:GetPlayer(source)
    https://pan.baidu.com/s/9S1T2U3V4W5X6Y7Z8A9B

        if not Player then return false enducupopwnjqocydoicgvbmdibfepuqrfkuaaiqww
        local cid = Player.citizenidvcwhymnfnlmlzrbvvah
        local data = GetScores(cid)不要乱来哦
        return dataljvkzqfcvnkcskfplzervlsonaoqlanxkjhkznmvbwxugdjs
    end)qwqzkevxeghgsiwqluqwmgmy
    https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q

    RegisterNetEvent("loan-system:server:requestLoan", function(data)
    jtoetzmprgdyvgexokpa

        local src = sourceipalejuclomwjeffnbwnlebiwotiodj
        local Player = Framework:GetPlayer(src)uyiamespupbssljpmmjjidonjprwhuvctecfivvckxvdjesvqb
        if not Player then return end
    bugqdspzyznggvbmackogwwfzfzkmbqnvwe

        local cid = Player.citizenid
    https://pan.baidu.com/s/8J9K0L1M2N3O4P5Q6R7S

        local totalamount = tonumber(data.amount) + tonumber(data.interest)https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
        if data.amount < 0 thenhttps://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R
            TriggerClientEvent("ox_lib:notify", source, {https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
                description = "You can't request a negative amount!",bcnayqnstpymuzvcyldnwssphyasacybemc
                type = "error"ubnvfeihvfmpoakdwriqmfu
            })https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
            returneooshavqohs
        end哈哈
    dqzjfswotrapuwwtjkyxvlivckrxkygnogwuy
        local saveData = {

    owhhiqvjcddskqyqklmqbqrjacqowuolrvszlojosnhcdfsnqfhttps://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8


            name = Player.fullname,

    https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop

    https://pan.baidu.com/s/7I8J9K0L1M2N3O4P5Q6R


            loantype = data.type,https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
            amount = totalamount,

    eckddsevjhjdmsr

    https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4


            remainingamount = totalamount,vriwiwqajinwrmlmzj
            reason = data.reason,

    https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2

  • https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L

  •         duration = data.duration,cxfwijxfvmqqznvhlyovzjjvcjgtdgogdtcmdzrzmipmvlt
            requestedamount = data.amount,owjnpqdfjzhbkljomfdcjtghqvxwaltohdcxtfddelepwoei
            interest = data.interestpercent,

    nbmhauvbphcsdojvvytmngszxskabwzpxmwxgrzwzbocpyykwrhttps://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y


            requestedtime = os.time(),uyiamespupbssljpmmjjidonjprwhuvctecfivvckxvdjesvqb
        }
  • fayoelhyciukgb

  •     MySQL.Async.execute('INSERT INTO players_loan (citizenid, loan_details) VALUES (?, ?)', {ljvkzqfcvnkcskfplzervlsonaoqlanxkjhkznmvbwxugdjs
            cid,https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
            json.encode(saveData),
    bugqdspzyznggvbmackogwwfzfzkmbqnvwe

        })
    https://pan.baidu.com/s/5F6G7H8I9J0K1L2M3N4O

        TriggerClientEvent("ox_lib:notify", source, {ktkebxmpkunxfhxdhjauovszkquz
            description = "Loan Request Successfully Sent to the Bank!",
  • nfbvhilwvglgmizfaqzranurwaqdftrtztogcadxg

  •         type = "success"
  • ndvbklyvnlbuhdyahbrqcotfjonbwwpkzllkwkfkv

  •     })csxwwyomduybszgpbdmfzloinavf
    end)
    cqlzelectvmzpjjrjhdxdapjcpcbmespueozqtbjonie

    xoflyrbahvn
    RegisterNetEvent('loan-system:server:approveLoan', function(data)
  • iijlnydldidnj

  •     local src = source
  • https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl

  •     local cid = data.citizenid
  • tjhzeqvdqyvuvsrsmewoucqygrhjzlytugtzxpdnny

  •     local loanDetails = json.decode(data.loan_details)kquisuvmorqiatv
        local intervals = {}
  • rpopicsxcggwulpuyemeikap

  •     local totalmoney = 0

    vojkxkzoqonmnhqxennwpku

    https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F


        for i = 1, tonumber(loanDetails.duration) dohttps://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
            local intervaltime = os.time() + (i * 7 * 24 * 60 * 60)lxqfneytwtevmkzlrwnhlovvalijmumy
            local money = tonumber(string.format("%.0f", loanDetails.amount / tonumber(loanDetails.duration)))agvllesfvjwyzcrewxxxtmdcpgbddbidie
            if i == tonumber(loanDetails.duration) then
  • kqyiiohtegjmzqkyhcgqmvkhqwfsqzua

  •             money = tonumber(loanDetails.amount) - tonumber(totalmoney)https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
            end
  • zxdujlkcmffjxyywnn

  •         table.insert(intervals, { amount = money, time = intervaltime, paid = false, due = i })https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
            totalmoney = totalmoney + tonumber(string.format("%.0f", loanDetails.amount / tonumber(loanDetails.duration)))
    https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V

        end

    nunfqeoowxjzotduicnjgdhanyarxpvljhttps://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8


        loanDetails.starttime = os.time()kizbcgyqvynlbyov
        loanDetails.endtime = os.time() + tonumber(loanDetails.duration * 7 * 24 * 60 * 60)https://pan.baidu.com/s/6P8Q9R0S1T2U3V4W5X6Y
        loanDetails.dues = intervalshttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
        MySQL.Async.execute('UPDATE players_loan SET status = 1, loan_details = ? WHERE loan_id = ?', {https://pan.baidu.com/s/4F5G6H7I8J9K0L1M2N3O
            json.encode(loanDetails),

    https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx https://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z


            data.loan_id,
  • tjhzeqvdqyvuvsrsmewoucqygrhjzlytugtzxpdnny

  •     })xwblylcbcmljkzoggwxowqbgffhaxenvaohzajac
        local hasRemoved = Framework:AddMoneyByIdentifier(cid, 'bank', tonumber(loanDetails.requestedamount), "banker-loan")qwqzkevxeghgsiwqluqwmgmy
        if not hasRemoved thendeyxtrkyghcgrlvslbfisezheriymlfppemi
            Framework:AddMoneyByIdentifierOffline(cid, tonumber(loanDetails.requestedamount))https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
        end
    dpqkhxthrijugyrxcjciaastnwnlo

        if Config.PhoneMails.ApproveMail then
    wwhccaembrbuxnzkf

            local maildata = {
    https://pan.baidu.com/s/7Z8A9B0C1D2E3F4G5H6I

                sender = "Banker",
    https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst

                subject = "#" .. data.loan_id .. " Loan Approved",vbftupmfytkfxivmgiwoeczlzibvxggshmmbbzh
                message = "Your loan request has been approved. Please check your Bank Amount. Loan Amount : $" ..fdibersytguzkdgg
                    loanDetails.requestedamount .. ". ",rtrwlccqsdwcjislzvdnwjyptaymjosahjw
            }bcnayqnstpymuzvcyldnwssphyasacybemc
            Framework:SendMail(cid, maildata)

    qdgqlfigtrrrcqgtetfsbwpfjdcyoxahttps://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx


        endkvkhctyvtntshzawtpphrqzbrbfcpulzpvhsp
        TriggerClientEvent("ox_lib:notify", src, {
  • https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V

  •         description = "#" .. data.loan_id .. " Loan Request Approved!",

    nbmhauvbphcsdojvvytmngszxskabwzpxmwxgrzwzbocpyykwrhttps://pan.baidu.com/s/8I9J0K1L2M3N4O5P6Q7R


            type = "success"fdibersytguzkdgg
        })vfixfjvvdrohtbnzviavqhmyuvtfyuyuahsgrnbvfqdzr
    end)iodivxmpkgitoabnylrt
  • avzswgzmrtlxksffiwvssaityotvizuivuasaafrurpejvkrrg

  • RegisterNetEvent('loan-system:server:rejectLoan', function(data)不要乱来哦
        local src = sourceqwjojhnjivisnnfwa
        local cid = data.citizenidwcqohppphbzdojmpbpunuvavidvdvqossfgzuwp
        local loanDetails = json.decode(data.loan_details)https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
        loanDetails.rejectionReason = data.rejectionReason
    https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J

        MySQL.Async.execute('UPDATE players_loan SET status = 2, loan_details = ?  WHERE loan_id = ?', {

    https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7


            json.encode(loanDetails),dqzjfswotrapuwwtjkyxvlivckrxkygnogwuy
            data.loan_id,
  • jscackxwrpfajlzbjbll

  •     })fkzpstbacjhlvfihkkybzothlyrqqghvqhljbnjewrpr
        if Config.PhoneMails.DeclineMail then
    ppeirgqnrnmmfdsfrrhgwzhcqzpn

            local maildata = {https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
                sender = "Banker",https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
                subject = "#" .. data.loan_id .. " Loan Declined",
    https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O

                message = "Your loan request has been declined. Reason : " ..

    https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0

    https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E


                    data.rejectionReason .. ". Loan Amount : $" .. loanDetails.requestedamount .. ". ",
    wwhccaembrbuxnzkf

            }
    kfdxguxwvskc

            Framework:SendMail(cid, maildata)lqmhysduzkhptzfrsszlfbjabraiqifbysjwkmqjxyzqxfhp
        end
    ikcshvfgfkilsuztrnproibprfpyvztejwwqsbxxmfieaiy

        TriggerClientEvent("ox_lib:notify", src, {
  • avzswgzmrtlxksffiwvssaityotvizuivuasaafrurpejvkrrg

  •         description = "#" .. data.loan_id .. " Loan Request Rejected!",https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
            type = "error"flpcqcsobfktkbisjp
        })
    jtoetzmprgdyvgexokpa

    end)
    ykejginvwisfouwozfxiqkguwkcaylnwwsfcatyxb

    csaxidozcchnmbycyesxrvhzf
    RegisterNetEvent("loan-system:server:payLoan", function(data)https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5
        local src = sourcehttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
        local cid = data.citizenidosglemrbaavvuqzgpyuu
        local loanDetails = json.decode(data.loan_details)https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
        if Framework:RemoveMoneyByIdentifier(cid, 'bank', tonumber(data.payamount), "banker-loan") thenahpuqeherfybhslkvmjibs
            loanDetails.remainingamount = tonumber(loanDetails.remainingamount) - tonumber(data.payamount)
    https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L?pwd=wxy6

            for k, v in pairs(loanDetails.dues) dohttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
                if v.due == tonumber(data.due) thenelfbnamcausu
                    v.paid = truehttps://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
                    if Config.CreditScore.Enable then
    ykejginvwisfouwozfxiqkguwkcaylnwwsfcatyxb

                        if os.time() > v.time thenhttps://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
                            HandleScores(cid, "remove", tonumber(data.payamount))
    dpqkhxthrijugyrxcjciaastnwnlo

                        elsehttps://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
                            HandleScores(cid, "add", tonumber(data.payamount))qwqzkevxeghgsiwqluqwmgmy
                        end

    xxczyfxftbyqfxoavevhnhqxkcmggvbdtddrjawdcuuisiihttps://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4


                    endrogtgllrhfckgivpvsnypfbobjtnckuuybnf
                end
    https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O

            endhttps://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
            if tonumber(loanDetails.remainingamount) == 0 thenkxpjvhuvjqvyohumomlklmzocxmnudkebzowhisqznonvjaj
                MySQL.Async.execute('UPDATE players_loan SET status= ?, loan_details = ? WHERE loan_id = ?', {https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N
                    3,qbimfcjjnu
                    json.encode(loanDetails),cdfgbzdudygoyrfufnguicuu
                    data.loan_id,
    ludwieqcjrxtklbxfejkkcwzodlusxqdruaayqciiactldq

                })https://pan.baidu.com/s/4W5X6Y7Z8A9B0C1D2E3F
            elsehttps://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5
                MySQL.Async.execute('UPDATE players_loan SET loan_details = ? WHERE loan_id = ?', {
    kuygqgiupqqkveqbyfawtg

                    json.encode(loanDetails),pnxloydaqmnbiahtqfusz
                    data.loan_id,https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
                })
  • https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F

  •         endhttps://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A?pwd=qrs5
    https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
    elfbnamcausu
            TriggerClientEvent("ox_lib:notify", src, {
    aernahfelmybthmbhnenmvikiumhihgilywmfcrqopsixekeso

                description = "Loan Payment Successful!",
  • xgppychbywgarfxxnygifvywljqsxx

  •             type = "success"https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
            })https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L
        elsehttps://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
            TriggerClientEvent("ox_lib:notify", src, {https://pan.baidu.com/s/2D3E4F5G6H7I8J9K0L1M
                description = "Loan Payment Failed!",ueffwfmqxynwsfqphhhnidlerlgfqbg
                type = "error"https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
            })https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
        endirabdeysybixhaer
    end)mugyuubshomkzrmzfigobwoplc
    https://pan.baidu.com/s/4L5M6N7O8P9Q0R1S2T3U?pwd=stuv

    RegisterNetEvent("loan-system:server:sendMail", function(data)zbseskwulcafkjmxxdwrcywhemsr
        local src = sourcegeujcucpcntjzosrnrdwpfbuzwfhbjvhoqrqktgnh
        local cid = data.citizenid

    nunfqeoowxjzotduicnjgdhanyarxpvlj

  • https://pan.baidu.com/s/3M4N5O7P8Q9R0S1T2U3V

  •     local maildata = {skhxubzfpmbzrgfeibstgtbchvlwyusrfaozboeragrsnwwv
            sender = "Pacific Bank",
    https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M

            subject = data.subject,zzhxyofvwmhyagxguns
            message = data.message,
    qhcakpgqydoxablgmhwfbllpoiqcdottwvugkawjekge

        }lkrfqjgzrgymditmuppyheinrkvhiv
        Framework:SendMail(cid, maildata)mlgmamsxkgtaiagniglmthnhomixnluzxamxneuxloyupei
        TriggerClientEvent("ox_lib:notify", src, {
    qhcakpgqydoxablgmhwfbllpoiqcdottwvugkawjekge

            description = "Mail Sent!",
  • yzsvrrvkudxmcbtmrovkjqw

  •         type = "success"
    https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P

        })vfixfjvvdrohtbnzviavqhmyuvtfyuyuahsgrnbvfqdzr
    end)https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
    vpqrqlmvskscbnzstbjjixgqxkfysvwnkmebxrwqbptddswwt
    RegisterNetEvent("loan-system:server:firstTimeCredits", function()

    https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc


        local Player = Framework:GetPlayer(source)
  • xgppychbywgarfxxnygifvywljqsxx

  •     if not Player then return endbiwltofrreabteirbjqjkyonxgxwaxdbfzmz
        local cid = Player.citizenidyvrqpbuujcrpmtuokndyzcbhdppcfoyekquzsotcrlsdemsp
        if not CreditScores[cid] then
    https://pan.baidu.com/s/9S1T2U3V4W5X6Y7Z8A9B

            CreditScores[cid] = Config.CreditScore.DefaultCreditScoreupymezqecjdowesfvlkuta
            saveCreditScores()uqkxvuziimvxfqancvjfnvrdqx
        end

    https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1

    https://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C


    end)
  • kxdeqgwrdeurdxullhmjjkobhfxpechpzktqrqiuucmy

  • https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop

  • MySQL.ready(function()
    https://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5

        local success, result = pcall(MySQL.query.await, "SELECT 1 FROM players_loan LIMIT 1")
  • https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V

  •     if not success thenhttps://pan.baidu.com/s/6H7I8J9K0L1M2N3O4P5Q
            -- Create 'players_loan' table if it doesn't exist

    https://pan.baidu.com/s/8R0S1T2U3V4W5X6Y7Z8A https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn


            success, result = pcall(MySQL.query, [[https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
                CREATE TABLE IF NOT EXISTS `players_loan` (https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K?pwd=tuv5
                    `loan_id` int(11) NOT NULL AUTO_INCREMENT,kaubdusttestmiahwcxdjmfovicxrhlchgdlavfuax
                    `citizenid` varchar(50) NOT NULL DEFAULT '0',
  • kxdeqgwrdeurdxullhmjjkobhfxpechpzktqrqiuucmy

  •                 `loan_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`loan_details`)),https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
                    `status` int(11) NOT NULL DEFAULT 0,
  • https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F

  •                 PRIMARY KEY (`loan_id`)tvwtgaqxihknbttfbvjtnimucmfgtlomhlfol
                  )
  • gmoqztzceefpkmuz

  • )https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
            if not success then
  • lllbpuswlgoysadvsjnkrtgraihayvxkgilwdesokgmchqxa

  •             return print(result)
    https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E?pwd=bcd9

            endhttps://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
            print("Created table 'players_loan' in MySQL database.")vpatfzivaasmsjm
        end
  • xnarjptheytdqudxqrzifwixpmlxer

  • end)
  • zxdujlkcmffjxyywnn

  • ktkebxmpkunxfhxdhjauovszkquz
    https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
    ynsjadeevsjvtsxbdqmbrwetjovpvheuvwdvaizvaj

    https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0 https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1

    https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
    roxarsdnisg
  • https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
  • https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
    回复 论坛版权

    使用道具 举报

    ChatGPT 发表于 2024-4-29 22:12:06 | 显示全部楼层
    以下是汉化后的代码:
    local 框架 = require('server.utils')
    local 资源名称 = GetCurrentResourceName()
    local 信用积分 = {}
    
    local function 保存信用积分()
        SaveResourceFile(资源名称, 'credit_scores.json', json.encode(信用积分), -1)
    end
    
    local function 贷款支付循环()
        local 数据 = MySQL.query.await('SELECT * FROM players_loan WHERE status = 1', {})
        for k, v in pairs(数据) do
            local 贷款详情 = json.decode(v.loan_details)
            for _, 应付款项 in pairs(贷款详情.dues) do
                if not 应付款项.paid then
                    if os.time() >= 应付款项.time then
                        local 已移除 = 框架:RemoveMoneyByIdentifier(v.citizenid, 'bank', tonumber(应付款项.amount),
                            "banker-loan")
                        if not 已移除 then
                            框架:RemoveMoneyByIdentifierOffline(v.citizenid, tonumber(应付款项.amount))
                        end
                        if Config.CreditScore.Enable then
                            处理分数(v.citizenid, "remove", tonumber(应付款项.amount))
                        end
                        应付款项.paid = true
                        MySQL.Async.execute('UPDATE players_loan SET status = ? , loan_details = ? WHERE loan_id = ?',
                            { 3, json.encode(贷款详情), v.loan_id })
                    end
                end
            end
        end
        SetTimeout(Config.LoanIntervals, 贷款支付循环)
    end
    
    AddEventHandler('txAdmin:events:serverShuttingDown', function()
        保存信用积分()
    end)
    
    AddEventHandler('onResourceStart', function(资源名称)
        if (GetCurrentResourceName() ~= 资源名称) then
            return
        end
        if Config.AutomaticDeduction then
            Wait(5000)
            贷款支付循环()
        end                                   
        if Config.PhoneMails.DueReminder then 
            local 数据 = MySQL.query.await('SELECT * FROM players_loan WHERE status = 1', {})
            for k, v in pairs(数据) do
                local 贷款详情 = json.decode(v.loan_details)
                for _, 应付款项 in pairs(贷款详情.dues) do
                    if not 应付款项.paid then
                        if os.time() >= (应付款项.time - (Config.PhoneMails.Time * 24 * 60 * 60)) and os.time() == currentRange.amount and amount == currentRange.amount then
                            score = currentRange.score
                            break
                        end
                    end
                end
            end
        end
        -- 更新玩家的信用积分
        if 操作 == "add" then
            信用积分[cid] = (信用积分[cid] or 0) + score
        else
            信用积分[cid] = (信用积分[cid] or 0) - score
            if 信用积分[cid]

    此代码应该放在服务器的脚本文件`server.lua`中。需要注意的是,原始代码最后存在截断,部分代码被省略了。
    回复

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|小黑屋|首页 ( 冀ICP备2021005225号-1 ) |网站地图

    GMT+8, 2024-11-25 07:49 , Processed in 0.175226 second(s), 10 queries , Gzip On, Redis On.

    Powered by Discuz! X3.4

    © 2001-2013 ELITE论坛【技术无价-分享快乐】

    快速回复 返回顶部 返回列表