Skip to content

Commit

Permalink
fix(client/carbuilder): incorrect event in warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
renzuzu committed Mar 28, 2023
1 parent 0a8857b commit de2126f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Citizen.CreateThread(function()
while true do
while spraying do Wait(100) end
SpawnProjectCars(GlobalState.ProjectCars)
if GetInteriorFromEntity(cache.ped) == 260353 then
inwarehouse = PlayerData?.job.name == Config.carbuilderjob
end
Wait(1000)
end
end)
Expand Down Expand Up @@ -1004,6 +1007,8 @@ RegisterNetEvent('renzu_projectcars:openpartlist', function(data,index,warehouse

if k == 'paint' then
TriggerEvent('renzu_projectcars:openpaint',data)
elseif inwarehouse then
TriggerEvent('renzu_projectcars:useparts',k,data.model)
else
local input = lib.inputDialog(v.label, {
{type = 'number', label = 'Quantity', icon = 'hashtag'},
Expand Down Expand Up @@ -1376,6 +1381,7 @@ Useitem['door'] = function(model)
end)
vehicle = getveh()
plate = string.gsub(tostring(GetVehicleNumberPlateText(vehicle)), '^%s*(.-)%s*$', '%1')
if not projectcars[plate] then return end
local status = json.decode(projectcars[plate].status)
while install and ProjectCount() > 0 do
dist, data = GetNearestProjectCar()
Expand Down Expand Up @@ -1877,6 +1883,7 @@ Interaction = function(type)
Wait(0)
until success ~= nil
end)
if inwarehouse then Wait(5000) success = true lib.cancelProgress() return end
success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'easy'})
if lib.progressActive() then
lib.cancelProgress()
Expand Down

0 comments on commit de2126f

Please sign in to comment.