Skip to content

Commit

Permalink
fix(bridge/qb/server/functions): GetPlayers()
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Oct 31, 2023
1 parent d5a87d3 commit 5038e41
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bridge/qb/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ functions.GetCoords = GetCoordsFromEntity
---@deprecated use the native GetPlayerIdentifierByType?
functions.GetIdentifier = GetPlayerIdentifierByType

---@deprecated use the native GetPlayers instead
functions.GetPlayers = GetPlayers
---@return Source[]
function functions.GetPlayers()
local sources = {}
local players = exports.qbx_core:GetQBPlayers()
for k in players do
sources[#sources+1] = k
end

return sources
end

---@deprecated use SpawnVehicle from imports/utils.lua
---@return number?
Expand Down

0 comments on commit 5038e41

Please sign in to comment.