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:
MrNewb committed 2025-04-14 01:16:06 -04:00
1 parent 663e3bc9c1
commit 870f440a1b
3 files changed
+33

No files matched your search

+11
View File
@@ -29,6 +29,17 @@ Framework.GetPlayerIdentifier = function(src)
return playerData.citizenid
end
---This will return a table of all logged in players
---@return table
Framework.GetPlayers = function()
local players = QBox:GetQBPlayers()
local playerList = {}
for src, _ in pairs(players) do
table.insert(playerList, src)
end
return playerList
end
-- Framework.GetPlayerName(src)
-- Returns the first and last name of the player.
Framework.GetPlayerName = function(src)