GetPlayers added
while theres a native to do this, the purpose of this is using the framework methods, this will only return logged in players ie wont include people who are in multichar and still not logged in
This commit is contained in:
1 parent
663e3bc9c1
commit
870f440a1b
3 files changed
+33
No files matched your search
@@ -133,6 +133,17 @@ Framework.GetPlayerInventory = function(src)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---This will return a table of all logged in players
|
||||
---@return table
|
||||
Framework.GetPlayers = function()
|
||||
local players = QBCore.Functions.GetPlayers()
|
||||
local playerList = {}
|
||||
for _, src in pairs(players) do
|
||||
table.insert(playerList, src)
|
||||
end
|
||||
return playerList
|
||||
end
|
||||
|
||||
Framework.GetItemBySlot = function(src, slot)
|
||||
local player = QBCore.Functions.GetPlayer(src)
|
||||
if not player then return end
|
||||
|
||||
Reference in new issue
Block a user