Merge pull request #966 from hakos47:patch-1

GetGroundHash
This commit is contained in:
Kakarot
2023-04-27 15:27:39 -07:00
committed by GitHub
+8 -1
View File
@@ -991,4 +991,11 @@ function QBCore.Functions.GetGroundZCoord(coords)
print(coords)
return coords
end
end
end
function QBCore.Functions.GetGroundHash(entity)
local coords = GetEntityCoords(entity)
local num = StartShapeTestCapsule(coords.x, coords.y, coords.z + 4, coords.x, coords.y, coords.z - 2.0, 1, 1, entity, 7)
local retval, success, endCoords, surfaceNormal, materialHash, entityHit = GetShapeTestResultEx(num)
return materialHash, entityHit, surfaceNormal, endCoords, success, retval
end