draft GetPlayerSourcesByJob

This commit is contained in:
MrNewb committed 2025-08-07 00:47:51 -04:00
1 parent 140bad5b34
commit b1556d13fb
4 files changed
+60 -30

No files matched your search

+3 -11
View File
@@ -336,18 +336,10 @@ Framework.SetPlayerDuty = function(src, status)
end
---This will get a table of player sources that have the specified job name.
---@param job any
---@param job string
---@return table
Framework.GetPlayersByJob = function(job)
local players = GetPlayers()
local playerList = {}
for _, src in pairs(players) do
local xPlayer = Framework.GetPlayer(src)
if xPlayer and xPlayer.getJob().name == job then
table.insert(playerList, src)
end
end
return playerList
return Framework.GetPlayerSourcesByJob(job) or {}
end
-- Sets the player's job to the specified name and grade.
@@ -363,7 +355,7 @@ Framework.SetPlayerJob = function(src, name, grade)
return
end
xPlayer.setJob(name, grade, true)
return true
return true
end
---This will add money based on the type of account (money/bank)