Skip to content

Commit de2126f

Browse files
committed
fix(client/carbuilder): incorrect event in warehouse
1 parent 0a8857b commit de2126f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client/client.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Citizen.CreateThread(function()
3131
while true do
3232
while spraying do Wait(100) end
3333
SpawnProjectCars(GlobalState.ProjectCars)
34+
if GetInteriorFromEntity(cache.ped) == 260353 then
35+
inwarehouse = PlayerData?.job.name == Config.carbuilderjob
36+
end
3437
Wait(1000)
3538
end
3639
end)
@@ -1004,6 +1007,8 @@ RegisterNetEvent('renzu_projectcars:openpartlist', function(data,index,warehouse
10041007

10051008
if k == 'paint' then
10061009
TriggerEvent('renzu_projectcars:openpaint',data)
1010+
elseif inwarehouse then
1011+
TriggerEvent('renzu_projectcars:useparts',k,data.model)
10071012
else
10081013
local input = lib.inputDialog(v.label, {
10091014
{type = 'number', label = 'Quantity', icon = 'hashtag'},
@@ -1376,6 +1381,7 @@ Useitem['door'] = function(model)
13761381
end)
13771382
vehicle = getveh()
13781383
plate = string.gsub(tostring(GetVehicleNumberPlateText(vehicle)), '^%s*(.-)%s*$', '%1')
1384+
if not projectcars[plate] then return end
13791385
local status = json.decode(projectcars[plate].status)
13801386
while install and ProjectCount() > 0 do
13811387
dist, data = GetNearestProjectCar()
@@ -1877,6 +1883,7 @@ Interaction = function(type)
18771883
Wait(0)
18781884
until success ~= nil
18791885
end)
1886+
if inwarehouse then Wait(5000) success = true lib.cancelProgress() return end
18801887
success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'easy'})
18811888
if lib.progressActive() then
18821889
lib.cancelProgress()

0 commit comments

Comments
 (0)