Merge branch 'main' into main

This commit is contained in:
Kakarot
2023-04-27 16:12:47 -07:00
committed by GitHub
13 changed files with 811 additions and 446 deletions
+8 -6
View File
@@ -21,13 +21,8 @@ end
function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text)
-- Use local function instead
SetTextFont(4)
SetTextProportional(0)
SetTextScale(scale, scale)
SetTextColour(r, g, b, a)
SetTextDropShadow(0, 0, 0, 0, 255)
SetTextEdge(2, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry('STRING')
AddTextComponentString(text)
DrawText(x - width / 2, y - height / 2 + 0.005)
@@ -991,4 +986,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