ULX

Author Topic: How to sort groups by power?  (Read 1995 times)

0 Members and 1 Guest are viewing this topic.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
How to sort groups by power?
« on: February 11, 2011, 02:43:03 PM »
Hi guys ;)

I'm making a script and I need to sort groups by their power, but I can't find a way of doing it automatically. I would like to build a table, like this:

1 - Owner
2 - Superadmin
3 - Admin
4 - Respected
5 - Newcomer
6 - Minge

How can I do this? I may need "ULib.ucl.groups[ply:GetUserGroup()].inherit_from" but I have no idea what to do with it, and I'm not even sure if that's what I need... :S

Thanks in advance if you can help!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: How to sort groups by power?
« Reply #1 on: February 11, 2011, 05:05:00 PM »
Maybe you're looking for ULib.ucl.getInheritanceTree?
Experiencing God's grace one day at a time.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: How to sort groups by power?
« Reply #2 on: February 11, 2011, 05:16:26 PM »
I'm sure that it's just what I need, thank you Meg ;)

Looking at XGUI's groups.lua helped me a lot, hehe
« Last Edit: February 11, 2011, 06:29:31 PM by Chironex »