I was testing out cRankManager:GetPlayerPermissions(UUID), seeing how it returned the *, when I found out it returned... literally nothing. So I tried it out with non-admin groups, and it continued to return nothing. So I tried a different, imperfect method to replicate it. Code and outputs below.
The Code:
function Initialize(a_Plugin)
a_Plugin:SetName("cRankManagerTest")
a_Plugin:SetVersion(1)
cPluginManager:BindCommand("/ranky", "a.b", ranksCommand, "")
-- Send a message to the console that Chatter is initialized.
LOG("Initialized cRankManagerTest v." .. a_Plugin:GetVersion())
return true
end
function OnDisable()
LOG("cRankManagerTest is disabled")
end
function ranksCommand(a_split,a_player)
local UUID = a_player:GetUUID()
LOG("======================")
LOG(UUID)
LOG(a_player:GetName())
local arr = cRankManager:GetPlayerPermissions(UUID)
LOG(table.concat(arr,", "))
local str = ""
for _,v in pairs(arr) do
str = str == "" and str .. v or str .. ", " .. v
end
LOG(#arr)
LOG(str)
LOG("___________________")
local str2 = ""
local arr2 = cRankManager:GetPlayerGroups(UUID)
LOG(#arr2)
for _,v1 in ipairs(arr2) do
local arr3 = cRankManager:GetGroupPermissions(v1)
LOG(#arr3)
for _,v2 in ipairs(arr3) do
str2 = str2 == "" and str2 .. v2 or str2 .. ", " .. v2
end
end
LOG(str2)
LOG("___________________")
return true
end