General > Developers Corner

ulx rank reading

<< < (3/3)

jay209015:
Wouldn't the easiest way of determing a users actual highest rank be the rank that has the highest amount of allows, including inheritance?

JamminR:
Many cases, yes, but not always.
Theoretically, as soon as we tried to depend on that method, some ULX user would have his so tweaked, he'd be granting "Elite" (using my previous examples) access to 'Respected', then denying them something because they were considered a different team or something.
Though a reasonable suggestion, it's just not foolproof that I can think of.

gorgorp:
well as i said before i figured it out

function GetGroupUser( ply )
   for k, v in pairs( ULib.ucl.authed[ ply ].groups ) do
      if v ~= ULib.ACCESS_ALL then
         return v
      else
         return "user"
      end   
   end
end

JamminR:
gorgorp, problem is, that I've been asking about;
That method isn't 100% guaranteed to return the 'highest' rank of a ULib group chain.
Might most of the time, but no guarantees.

Navigation

[0] Message Index

[*] Previous page

Go to full version