Skip to content

Commit

Permalink
Merge pull request renzuzu#155 from renzuzu/a
Browse files Browse the repository at this point in the history
fix(client): fix inside garage takeout vehicle and empty garage issue
  • Loading branch information
renzuzu authored Oct 20, 2021
2 parents 0724a55 + bbb2f1b commit 8a99b04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,7 @@ function OpenGarage(id,garage_type,jobonly,default)
else
TriggerEvent('renzu_notify:Notify', 'info','Garage', 'You dont have any vehicle')
SetEntityCoords(PlayerPedId(), garagecoord[tid].garage_x,garagecoord[tid].garage_y,garagecoord[tid].garage_z, false, false, false, true)
CloseNui()
end

end
Expand Down Expand Up @@ -2871,7 +2872,7 @@ AddEventHandler('renzu_garage:ingaragepublic', function(coords, distance, vehicl
TriggerEvent('renzu_popui:closeui')
drawtext = false
end
end,plate)
end,plate,id)
--end
--end
end)
Expand Down
20 changes: 11 additions & 9 deletions server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -671,15 +671,17 @@ ESX.RegisterServerCallback('renzu_garage:isvehicleingarage', function (source, c
local result = MysqlGarage(Config.Mysql,'fetchAll','SELECT `stored` ,impound FROM owned_vehicles WHERE TRIM(UPPER(plate)) = @plate', {
['@plate'] = plate
})
local garage_impound = impoundcoord[1].garage
local impound_fee = ImpoundPayment
if result[1] and result[1].impound then
for k,v in pairs(impound_G) do
for k2,v2 in pairs(v) do
if k2 == plate then
garage_impound = k
impound_fee = v2.fine or ImpoundPayment
break
if string.find(id, "impound") then
local garage_impound = impoundcoord[1].garage
local impound_fee = ImpoundPayment
if result[1] and result[1].impound then
for k,v in pairs(impound_G) do
for k2,v2 in pairs(v) do
if k2 == plate then
garage_impound = k
impound_fee = v2.fine or ImpoundPayment
break
end
end
end
end
Expand Down

0 comments on commit 8a99b04

Please sign in to comment.