04-11-2012, 12:53 AM
Yes, use Player:GetGroups()
GetGroups() does not return an std::list in Lua though, it returns a regular Lua table/array which you can iterate through.
This should work I think
GetGroups() does not return an std::list in Lua though, it returns a regular Lua table/array which you can iterate through.
This should work I think
Code:
for Key, Group in pairs(Player:GetGroups()) do
LOG("Player " .. Player:GetName() .. " is in group " .. Group:GetName() )
end