feat(server/functions): Add GetQBPlayers() fn

A wrapper that returns an array of QB Player instances. Mainly to provide a better solution to the GetPlayers() -> GetPlayer pattern seen everywhere.
This commit is contained in:
Taso
2021-09-27 16:42:32 -04:00
committed by GitHub
parent adc1e9512d
commit a335196d10
+6 -1
View File
@@ -71,6 +71,11 @@ function QBCore.Functions.GetPlayers()
return sources
end
-- Will return an array of QB Player class instances
-- unlike the GetPlayers() wrapper which only returns IDs
function QBCore.Functions.GetQBPlayers()
return QBCore.Players
end
-- Paychecks (standalone - don't touch)
function PaycheckLoop()
@@ -293,4 +298,4 @@ function QBCore.Functions.IsLicenseInUse(license)
end
end
return false
end
end