Skip to content

Commit

Permalink
fix(client/impound): Plane , Boat Impound
Browse files Browse the repository at this point in the history
  • Loading branch information
renzuzu committed Mar 13, 2023
1 parent e56ba10 commit 9f7f594
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ RegisterNetEvent('opengarage', function(id,lastvehicle)
while not fetchdone do
Wait(0)
end
OpenImpound(v.garage)
OpenImpound(v.garage,v.Type)
break
end
end
Expand Down
5 changes: 3 additions & 2 deletions client/impound.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RegisterCommand('impound', function(source, args, rawCommand)
end
end, false)

function OpenImpound(garageid)
function OpenImpound(garageid,type)
local garageid = garageid
inGarage = true
local ped = cache.ped
Expand Down Expand Up @@ -77,6 +77,7 @@ function OpenImpound(garageid)
if 'police' == PlayerData.job.name then
for k,v2 in pairs(OwnedVehicles) do
for k2,v in pairs(v2) do
print(v.type)
if string.find(v.type, "car") then v.type = 'car' end
if v.garage_id ~= 'private' and not nearbyvehicles[plate] and v.impound and ispolice
or v.garage_id ~= 'private' and not nearbyvehicles[plate] and not v.stored and ispolice then
Expand Down Expand Up @@ -142,7 +143,7 @@ function OpenImpound(garageid)
if vehtable[v.impound] == nil then
vehtable[v.impound] = {}
end
if v.type ~= 'air' and v.type ~= 'boat' then
if GarageType[type](v.model) then
if tostring(v.enginehealth) == "nan" or v.enginehealth == 'nan' or v.enginehealth == (tonumber('nan')) then
v.enginehealth = 1000.0
end
Expand Down
31 changes: 31 additions & 0 deletions conf/impound.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,37 @@ impoundcoord = {
spawn_z = 4.0571403503418,
heading = 211.5486907959
},
{
garage = "boat_impound", --vecpucci
name = 'Boat Impound',
job = "police",
Type = "boat",
Dist = 5,
Blip = {color = 6, sprite = 68, scale = 0.75},
garage_x = -806.455, -- -806.455, -1496.521, 1.595, 175.062
garage_y = -1496.521,
garage_z = 1.595,
spawn_x = -813.954, -- -813.954, -1496.984, -0.119, 91.979
spawn_y = -1496.98,
spawn_z = -0.119,
heading = 91.979
},

{
garage = "air_impound", --vecpucci
name = 'Plane Impound',
job = "police",
Type = "air",
Dist = 5,
Blip = {color = 6, sprite = 68, scale = 0.75},
garage_x = -956.168, -- -956.168, -2919.616, 13.96, 159.489
garage_y = -2919.616,
garage_z = 13.96,
spawn_x = -976.526, -- -976.526, -2964.213, 14.547, 154.357
spawn_y = -2964.213,
spawn_z = 14.547,
heading = 154.357
},
}
impound_duration = { -- in hours
[1] = 0,
Expand Down

0 comments on commit 9f7f594

Please sign in to comment.