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.
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