General > Developers Corner

ULib.ucl.getInheritanceTree

(1/1)

iViscosity:
EDIT: Nevermind, I ended up going onto my own server and running it myself (the RCON tool didn't show the formatting so I wasn't sure), what I thought was the case.

EDIT2: I have a separate question though, how does ULX check if a player can target another player? Like, inheritance-wize?

I'm a bit confused about how ULib.ucl.getInheritanceTree() works. From the example it gives:
--- Code: ---PrintTable( ULib.ucl.getInheritanceTree() )
user:
   trusted:
       members:
   thedumbones:
   admin:
       superadmin:
       serverowner:
       clanowner:
   respected:
--- End code ---
does that mean like this (going down means higher in the chain)

--- Code: ---user         —       thedumbones         —       admin         —       respected
  |                                                   |
trusted                                       superadmin         —       serverowner         —       clanowner
   |                                           
members

--- End code ---
So in simple words, trusted inherits from user, and members inherits from trusted, then superadmin, serverowner, and clanowner inherit from admin, etc.?

Sorry if that doesn't really make sense I'm not really sure how to explain it.

Megiddo:
For edit two, ULib.getUsers is called with the value of ULib.ucl.getGroupCanTarget, and now you have all the players the user can target. :)

iViscosity:
Ahhhh, that makes a lot of sense. Thanks :)

(I was wondering because of this :)))

Navigation

[0] Message Index

Go to full version