GetGroundHash

returns the hash of the terrain you are on. quite useful for planting scripts
This commit is contained in:
Hakos47
2023-03-23 12:24:30 +01:00
committed by GitHub
parent b6249c3783
commit 15a264c3c9
+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,veh,7)
local arg1, arg2, arg3, arg4, arg5 = GetShapeTestResultEx(num)
return arg5
end