Having Multiple issues, just installed newest version and am running this script for the first time. using default tracks to test it out. races seem to start fine but when the ;ast person finishes the race it doesnt end and is stuck on our screen with the timer still going. restarting the script is the only solution and that means the race isnt counted. attached is the only error i am getting. please help
#CW-Racingapp issues
1 messages · Page 1 of 1 (latest)
Does your vehicle.lua have hash property on vehicles? It seems like you have two scripts that are failing at fetching hash there
if you're using QBcore then this is where it should be created:
https://github.com/qbcore-framework/qb-core/blob/e488cbe61e661dc86d16d9e9e7ed4b3e1e341cea/shared/vehicles.lua#L776
Ok I do have hash on my vehicles in my Lua but I’m gonna check into all this and get back to you
My vehicle Kia is still in the older format though
might be that
There's a bit of a cheap fix
That might just fix this issue going forward also
What’s that?”
Swap out getVehicleModel function in client/functions.lua with
function getVehicleModel(vehicle)
local model = GetEntityModel(vehicle)
if Config.Core == 'qb' then
for vmodel, vdata in pairs(QBCore.Shared.Vehicles) do
if model == joaat(vmodel) then
return vdata.name, vdata.brand
end
end
print('^1It seems like you have not added your vehicle ('..GetDisplayNameFromVehicleModel(joaat(vmodel))..') to the vehicles.lua')
return GetDisplayNameFromVehicleModel(model)
elseif Config.Core == 'esx' then
return GetDisplayNameFromVehicleModel(model)
end
return 'Unknown Model'
end
it should work the same way
and will probably get around not having a hash included
Alrighty, I’ll do this and let you know do the results. I really appreciate and want to say that these 3 scripts that I mentioned I’m using is something we’ve been looking for a long time and we are super excited to have them. We appreciate you
Thank you. Appreciate it ✌️
Let me know how it goes. This fix would work for everyeone so might as well do it like this if it works
Ok I’ll test that after o get some working tonight and get back to you
When I attempted to change my vehicle Lua it worked but when I brought up the mech tool it wouldn’t show names or brands anymore so I reverted back. My vehicle Lua does that have that stuff at the very bottom and all my cars are still in brackets
did you try the fix above then?
Do I need to still do this change or did you do that change in the update already? I didn’t get to do it last night
Alrighty i appreciate you
so the races are wroking perfect now but the mechtool is giving me a joaat error
^1SCRIPT ERROR: @cw-mechtool/client/client.lua:125: bad argument #1 to 'joaat' (string expected, got nil)^7
^3> callback^7 (^5@qb-menu/client/main.lua^7:88)
Yeah you got the same issue there
is it my vehicle lua?
i use qbcore
Ah in that case I dunno
its working on some cars and then i get the error with some cars
Then it's your cars that's the issue
any suggestion on what to look for in the fileds of a car that isnt working with the tool?
maybe a certain value in one of the meta files?
You're probably missing hashes or something
Compare a car that works and one that don't
alrighty, i appreciate your time
well ive compared a bunch of cars that do work and bunch that dont with eachother and cant seem to figure it out. is this script better to run off the latest layout of the vehicles lua with that section of info at the bottom or would the older version with everything still in brakets work fine?