Add server function for getting entity coords

This commit is contained in:
BerkieBb
2021-06-21 14:06:58 +02:00
committed by GitHub
parent 59ebd81f04
commit 962cd4a997
+11
View File
@@ -21,6 +21,17 @@ QBCore.Functions.ExecuteSql = function(wait, query, cb)
return rtndata
end
QBCore.Functions.GetEntityCoords = function(entity)
local coords = GetEntityCoords(entity, false)
local heading = GetEntityHeading(entity)
return {
x = coords.x,
y = coords.y,
z = coords.z,
a = heading
}
end
QBCore.Functions.GetIdentifier = function(source, idtype)
local idtype = idtype ~=nil and idtype or QBConfig.IdentifierType
for _, identifier in pairs(GetPlayerIdentifiers(source)) do