Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question BUG IN VRP

admhideki

Gold Elite
Joined
Oct 17, 2022
Messages
48
Solutions
1
Reaction score
650
Points
306
Location
Brazil
Website
discord.gg
Sorry translate..

Hello!
I'm trying to make a script run on vrp, qbcore, esx and creative. I don't know how to make the code play my vrp.

Code:
SetTimeout(500, function()
    if Config.framework == "ESX" then
        ESX = nil
        TriggerEvent(Config.eventESX, function(obj) ESX = obj end)
        
    elseif Config.framework == "QBCore" then
        QBCore = nil
        QBCore = exports['qb-core']:GetCoreObject()
        
    elseif Config.framework == "vRP" then
        vRP = nil
        vRP = exports.vRP
    end
end)

PlayerPaidWash = function(_src, cb)

    if Config.framework == "ESX" then
        local xPlayer = ESX.GetPlayerFromId(_src)
        if xPlayer.getAccount("bank").money >= Config.price then
            xPlayer.removeAccountMoney("bank", Config.price)
            return cb(true)
        end

    elseif Config.framework == "QBCore" then
        local Player = QBCore.Functions.GetPlayer(_src)
        if Player.Functions.GetMoney("bank") >= Config.price then
            Player.Functions.RemoveMoney("bank", Config.price)
            return cb(true)
        end
        
    elseif Config.framework == "vRP" then
        local Player = vRP.getUserId(_src)
        if vRP.getBankMoney(Player) >= Config.price then
            vRP.tryFullPayment(Player, Config.price)
            return cb(true)
        end
    end
        
    return cb(false)
end

Error: No such export getUserId in resource vRP
 
Top