๐ฅ๏ธServer Function Reference
Learn about and how to use common core server functions!
QBCore.Functions.GetCoords
function QBCore.Functions.GetCoords(entity)
local coords = GetEntityCoords(entity, false)
local heading = GetEntityHeading(entity)
return vector4(coords.x, coords.y, coords.z, heading)
end
-- Example
local ped = GetPlayerPed(source)
local coords = QBCore.Functions.GetCoords(ped)
print(coords)QBCore.Functions.GetIdentifier
function QBCore.Functions.GetIdentifier(source, idtype)
local idtype = idtype or QBConfig.IdentifierType
for key, value in pairs(GetPlayerIdentifiers(source)) do
if string.find(value, idtype) then
return identifier
end
end
return nil
end
-- Example
local identifier = QBCore.Functions.GetIdentifier(source, 'license')
print(identifier)
OR -- defaults to the identifier in the config of qb-core
local identifier = QBCore.Functions.GetIdentifier(source)
print(identifier)QBCore.Functions.GetSource
QBCore.Functions.GetPlayer
QBCore.Functions.GetPlayerByCitizenId
QBCore.Functions.GetPlayerByPhone
QBCore.Functions.GetPlayers
QBCore.Functions.GetQBPlayers
QBCore.Functions.CreateCallback
QBCore.Functions.CreateUseableItem
QBCore.Functions.CanUseItem
QBCore.Functions.UseItem
QBCore.Functions.Kick
QBCore.Functions.AddPermission
QBCore.Functions.RemovePermission
QBCore.Functions.HasPermission
QBCore.Functions.GetPermission
QBCore.Functions.IsPlayerBanned
QBCore.Functions.IsLicenseInUse
Last updated