[RELEASE][VRP] vRP Showroom v2.0

My problem is that i buy a car and at the moment of spawnear for the first time it comes out with modifications ¡I can’t find the error!

Do you have them for us the car pack?thx

Hello i need help, i dont know if i did this but my cars are not despawning after seeing it in showroom. And sometimes when i exit the showroom and go with noclip at the location where car preview are, its still there rotating and i can enter in it, but its not moving


1 car is rotating but the other one is staying in place.

Hi. I’ve been trying to getting the showroom to work for a couple of hours on my server now.

First I only added one of my addOn cars to the shop, bought it and it all worked fine.
Then I added all the cars, which shall be in the cardealer(+100 cars), and now I can’t see the showroom, when I press “Enter” at the Sales Agent. It brings me to the spot ontop of Maze Bank(or whatever it is), but there’s no menu for the cars.

Whenever I press “Enter” on the Sales Agent, a .lua error comes up from client.lua attempt to index a nil value(menu), but everything seems to be in client.lua

Do you have any ideas, that might fix my problem?

Did you manage to fix it?

tema del lscustoms cambia los valores def to -1 saludos.

Have you found a solution?

Grate script! Works perfect and looks grate! :smiley: But i cant purchase any of the cars? I bet its a permission im missing but can any1 point me were to look for it? :slight_smile:

You need the cars in your server. For example : you have tesla in your vehicles list but you dont have the car on your server (script).

any1 know why i can add a new list? (“test” for me)!

What u mean with server(Script) I have my cars in the vrp_showroom config.lua and client.lua? :slight_smile:

Tell me more about your issue. Can you give me a picture of your code? Or the code? Your just cant buy? You want to make another list of cars?

This is the error im getting: [vRP/C#] connection/command path vRP/get_vehicle not found

I can load the cars and everything but when i press Enter to buy it nothing happens and i get that error in the console :slight_smile:

Did you changed something?If yes, where?
In code line

Nothing but the cars in the shop… :confused: Not sure if im missing a permission for allowing car dealer to buy them?

You need to enter in vrp_showroom/client.lua . There you can change the cars. Try with adder or journey. Cfg folder dont work. (for me)

I have added them in the client file aswell :confused: I think it might be a error in my basic_garage

Now im getting this in my console:

SCRIPT ERROR: @vrp_showroom/server.lua:40: attempt to index a nil value (field ‘?’)

cb (@vrp_showroom/server.lua:58)
handler (- begin MySQL module
local MySQL = {}

MySQL.debug = false
local dpaths = {}

local tasks = {}

–[[
local function tick()
SetTimeout(1, function() – protect errors from breaking the loop
SetTimeout(1000, tick)

local rmtasks = {}
for id,cb in pairs(tasks) do
  local r = exports.vrp_mysql:checkTask(id)
  if r.status == 1 then
    cb(r.rows,r.affected) -- rows, affected
    table.insert(rmtasks, id)
  elseif r.status == -1 then
    print("[vRP] task "..id.." failed.")
    table.insert(rmtasks, id)
  end
end

-- remove done tasks
for k,v in pairs(rmtasks) do
  tasks[v] = nil
end

end)
end
tick()
–]]

AddEventHandler(“vRP:MySQL_task”, function(task_id, data)
– print(“vRP:MySQL_task “…task_id)
local cb = tasks[task_id]
if data.status == 1 then
if cb then
if data.mode == 0 then
cb(data.affected or 0)
elseif data.mode == 1 then
cb(data.scalar or 0)
elseif data.mode == 2 then
cb(data.rows or {}, data.affected or 0) – rows, affected
end
end
elseif data.status == -1 then
print(”[vRP] task “…task_id…” failed.”)
end

tasks[task_id] = nil

if MySQL.debug and dpaths[task_id] then
print("[vRP] MySQL end query “…dpaths[task_id]…” ("…task_id…")")
dpaths[task_id] = nil
end
end)

local task_id = -1
AddEventHandler(“vRP:MySQL_taskid”, function(_task_id)
– print("vRP:MySQL_taskid "…_task_id)
task_id = _task_id
end)

– host can be “host” or “host:port”
function MySQL.createConnection(name,host,user,password,db,debug)
– print("[vRP] try to create connection “…name)
– parse port in host as “ip:port”
local host_parts = splitString(host,”:")
if #host_parts >= 2 then
host = host_parts[1]…";port="…host_parts[2]
end

local config = “server=”…host…";uid="…user…";pwd="…password…";database="…db…";"

– TriggerEvent(“vRP:MySQL:createConnection”, name, config)
exports.vrp_mysql:createConnection(name, config)
end

function MySQL.createCommand(path, query)
– print("[vRP] try to create command "…path)
– TriggerEvent(“vRP:MySQL:createCommand”, path, query)
exports.vrp_mysql:createCommand(path, query)
end

– generic query
function MySQL._query(path, args, mode, cb)
– TriggerEvent(“vRP:MySQL:query”, path, args)
if not (type(args) == “table”) then
args = {}
end

– force args to be a C# dictionary
args._none = " "

– exports.vrp_mysql:query(path, args)
– print("[vRP] try to query “…path…” id “…task_id)
TriggerEvent(“vRP:MySQL_query”, path, args, mode)
if MySQL.debug then
print(”[vRP] MySQL begin query (m"…mode…") “…path…” ("…task_id…")")
dpaths[task_id] = path
end

tasks[task_id] = cb
end

– do a query (multiple rows)
— cb(rows, affected)
function MySQL.query(path, args, cb)
MySQL._query(path, args, 2, cb)
end

– do a scalar query (one row, one column)
— cb(scalar)
function MySQL.scalar(path, args, cb)
MySQL._query(path, args, 1, cb)
end

– do a execute query (no results)
— cb(affected)
function MySQL.execute(path, args, cb)
MySQL._query(path, args, 0, cb)
end

– return module
return MySQL

Hello. I have a problem. After i buy a car from the showroom, i get ît în The garage and when i spawn IT its already tunned engine, brakes, almost everything level 1 or 2 and with body customisation ( spoilers fenders) . Can you help ME to get The car stock from showroom?

Great script !!
Im using dunko’s vrp framework, and it gives me db errors when I buy the car, causing people to spend money and get no car.


Can somebody help me?