Skip to content

Commit

Permalink
Merge pull request #60 from JnKTechstuff/patch-1
Browse files Browse the repository at this point in the history
Add model dimension calculation
  • Loading branch information
MonkeyWhisper authored Sep 15, 2022
2 parents 29c62f6 + 6100aa2 commit 6494613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ RegisterCommand('inventory', function()
local vehicle = QBCore.Functions.GetClosestVehicle()
if vehicle ~= 0 and vehicle ~= nil then
local pos = GetEntityCoords(ped)
local dimensionMin, dimensionMax = GetModelDimensions(GetEntityModel(vehicle))
local trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0.0, (dimensionMin.y), 0.0)
local dimensionMin, dimensionMax = GetModelDimensions(GetEntityModel(vehicle))
local trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0.0, (dimensionMin.y), 0.0)
if (IsBackEngine(GetEntityModel(vehicle))) then
trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0.0, (dimensionMax.y), 0.0)
end
Expand Down

0 comments on commit 6494613

Please sign in to comment.